IE 8 Refresh Issues

Hi All,

Can anyone tell me how to stop IE 8 going into quirks mode whenever you refresh the page?

It renders the page properly when you first call the page (margin : auto, say) but then when you refresh either by the button or F5 it breaks into quirks mode…only way to re render in standards mode is to load page again

this is very frustrating

and grrrrrr

Thx Alex

thanks noonnope for answering

yes had valid DTD…

What is curious is that when you RENDER the page first it renders in standards mode

When YOU REFRESH it breaks

this is the html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      #box {
        width : 500px;
        margin : 10px auto 10px auto;
        border : 1px solid #000000;
#box p {
  padding : 5px;
    <div id="box">
      <p>Hi there</p>
      <p>Demonstrating how crap IE is</p>

what i am suspecting is that maybe i have some factory setting changed :frowning:

Some setting somewhere is making it deliberately show in quirks mode on refresh

are you using a DTD in your document? IE uses the DTD to trigger the standard mode.

silly question, but are you sure your server is sending it as utf-8 in the response headers? I’m unable to recreate your ‘problem’ locally at all, though on my server it does right up until I make the test html file match what the server is saying the character encoding is.

Wait, when you save your utf-8 on your copy – are you including the BOM? That too could be causing it. (part of why when working with .html and not php I restrict myself to ascii7, since then you don’t even have to THINK about character encoding)

are you using, by any chance, Icefaces on the server side? if so, there is an answer here. if not, there may be a similar answer, but you need to tell if and what is on your server side. maybe it’s causing the same striping of the DTD on resend.

it seems to me that at first IE renders your page using page’s info, in standard mode. when you refresh it must “obey” some other settings, because it’s not doing the switch to quirks mode on my side.

if you use the developer bar and set the quirks mode, you’ll see that on refresh it keeps the same quirks mode. hope this helps :slight_smile: