138701
Goto Top

?ver funktioniert nicht

Hallo zusammen,

style.css
#logo a {
	background-image: url(../img/home.png?ver=20190601);
	background-image: url(../img/anime.png?ver=20190602);
	background-image: url(../img/websites.png?ver=20190603);
	background-image: url(../img/programs.png?ver=20190604);
	background-image: url(../img/other.png?ver=20190605);
	background-size: 84px;
	background-position: center top;
	background-repeat: no-repeat;
	color: #444;
	height: 84px;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.3em;
	margin: -130px auto 25px;
	padding: 0;
	text-decoration: none;
	width: 84px;
	text-indent: -9999px;
	outline: none;
	overflow: hidden;
	display: block;
}

index.html
<!DOCTYPE html>
<html lang="de-DE">  
<head>
	<meta name="viewport" content="width=device-width" />  
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>  
	<title>Ileies &#8250; Home</title>
	<link rel="stylesheet" href="css/style.css?ver=20190601" type="text/css" />  
</head>

<body>
	<h1 id="logo">  
		<a><img alt="Ileies" src="img/home.png" /></a>  
	</h1>
	<h1>Kategorien</h1>
	<ul>
		<li><a href="categories/anime.html">Anime</a></li>  
		<li><a href="categories/programs.html">Programme</a></li>  
		<li><a href="categories/websites.html">Websites</a></li>  
		<li><a href="categories/other.html">Sonstige</a></li>  
	</ul>
</body>
</html>

Bei der CSS geht es um Zeile 2 und bei der HTML um Zeile 7.
Warum wird kein Bild hinzugefügt?

Content-Key: 465123

Url: https://administrator.de/contentid/465123

Printed on: May 2, 2024 at 05:05 o'clock

Member: falscher-sperrstatus
falscher-sperrstatus Jun 22, 2019 at 07:38:24 (UTC)
Goto Top
Weil du vermutlich kein Backend hast, welches den Parameter "ver" verwertet. Sieht statisch aus.

VG
Member: Dani
Solution Dani Jun 23, 2019 updated at 13:15:34 (UTC)
Goto Top
Moin,
Warum wird kein Bild hinzugefügt?
funktioniert es, wenn du die Variable weglässt? Wobei ich noch nie gesehen habe, dass Bilder mit Hilfe der Variable neu geladen werden und nicht aus dem Cache.


Stichwort ist JavaScript CSS Cache: Strategies for Cache-Busting CSS


Gruß,
Dani