OT: Kod & skräpwebbläsare
*snip*
Du har svaret rakt framför ögonen om du bara ids läsa de kommentarer som fanns i det bloginlägget. Om du inte orkar läsa dem, tänker jag klistra in dem här.
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td bgcolor="blue">/images/hr.gif</td></tr></table>
Axel on 21.10.04:
Why should someone do that? I guess that the whole shit happened not on purpose. My guess is it has to do with IE!
OH NO… I’m blaming Microsoft! Yes and No. Yes, because IE behaves strange! ...and No because it is your code John, causing the problem.
I don’t know what is wrong with it; I’ve got not the slightest clue. But the case is, resizing the page in IE, reloads the images again (not so in Firefox).
Two days ago, (I guess), when I first looked at the new design, and tried out its liquidity in IE, the page did not stop reloading.
It loaded every image again… again… and again …and came never to a stop. Because of that, I closed the browser window! I bet somebody not!!!
The problem with the ongoing reload, is fixed now (how have you done it John, and what caused it?), but still when resizing the page, the images reload for every resize.
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td bgcolor="blue">/images/hr.gif</td></tr></table>
Jon on 21.10.04:
Alex you beat me to it.
I too am using IE and every time I resize the page it reloads all the images.
Also for every character i have just typed into this textbox it has also reloaded all the images!
Bizarre to say the least.
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td bgcolor="blue">/images/hr.gif</td></tr></table>
Aleksandar on 21.10.04:
Jon, I see that you are using Apache. I never used it, but the behavior you have here in IE (constant download of all background images) is replicable on IIS, when you set Content Expliration in it.
IE will then re-request each image on any CSS or script that changes the page display. This includes :hover changes, font-weight or background-position change, showing and hiding elements etc.
It’s the same problem that causes flickering when using pixy’s fast rollovers. IE does not cache the images (and even its own .htc files if you use them) and is constantly downloading them again, for each change.
So I guess that you should look for solution somwhere in the server setting. Mind you – not a single browser has any problems with this setting – only IE. I always find it funny that MS’s own products don’t work well together.
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td bgcolor="blue">/images/hr.gif</td></tr></table>
Roman Filippov on 5.11.04:
Sometimes that happens to IE when you use different background images on hover. It will request the hovered image every time you put a pointer over the link. Also I’ve seen that happen with some glitched out javascripts and IE, it was requesting the same images from the site over and over and over untill i left the page. It was going in a loop for preloaded js images. weird.
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td bgcolor="blue">/images/hr.gif</td></tr></table>
Och så slutligen en insikt från skaparen av sidan om vad som EGENTLIGEN orsakade problematiken som bara uppstod i IE.
Jon Hicks on 22.10.04:
Sam – it should be fixed now. I was using a javascript to change the stylesheet depending on how wide the browser window was (from The Man in Blue’s ‘resolution dependent layout’ idea). Once I removed this, the reloading seemed to stop in IE.
Det verkar som om det är uppdateringen av CSS som får IE att helt ladda om bilderna. I Firefox laddas bilderna inte om om CSS uppdateras och det är samma fil som används, samma fall i IE innebär att IE laddar ned bilden en gång till. Där är problemet och skillnaden.