Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

IE8 in CompatMode: Conditional Comments bug?

microsoft.public.internetexplorer.general






Speedup My PC
Reply
  #1 (permalink)  
Old 03-28-2009
Tereska
 

Posts: n/a
IE8 in CompatMode: Conditional Comments bug?
I have a page with script a tag in the HEAD section (just before
conditional comments):

In IE8 Standards Mode everything is OK:
a) ie loads css file just for ie8

but in IE8 Compat View (i've change mode using icon on the right of
the address bar):
a) ie loads BOTH css for ie7 and ie8 (but not for IE6!!)

When I delete script tag (after head section) everything is OK in IE8
standards Mode and CompatMode!! (IE loads appropriete css file)

I'm using Fiddler 2 to see which css file IE loads up.

Please tell me WHY this is happening?

My example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>

<script type="text/javascript">
// if you delete this script tag everything is OK
</script>

<title>TEST</title>

<![if !IE]>
<link type="text/css" rel="stylesheet" href="/0,style.css"/>
<![endif]>

<!--[if IE 6]>
<link type="text/css" rel="stylesheet" href="/ie6,style.css"/
>

<![endif]-->

<!--[if IE 7 ]>
<link type="text/css" rel="stylesheet" href="/ie7,style.css"/
>

<![endif]-->

<!--[if IE 8]>
<link type="text/css" rel="stylesheet" href="/ie8,style.css"/
>

<![endif]-->

</head>

<body>
</body>
</html>
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-28-2009
Tereska
 

Posts: n/a
Re: IE8 in CompatMode: Conditional Comments bug?
If you want to see examples in action:

(You must first install Fiddler2 or some kind of sniffer software to
see which css files are loaded)

http://slawomir.janecki.pl/ie_ok.html
In IE8 Standards Mode loads only css for IE8 (OK)
In IE8 Compat Mode loads only css for IE7 (OK)
All is OK.

http://slawomir.janecki.pl/ie_bad.html
after adding SCRIPT tag before conditional comments (SCRIPT tag is
empty or with some javascript, whatever)
In IE8 Standards Mode loads only css for IE8 (OK)
In IE8 Compat Mode loads 2 css! for IE8 and IE7 (!!!!!!! BAD thing)

Anyone can help he?
Reply With Quote
  #3 (permalink)  
Old 03-28-2009
rob^_^
 

Posts: n/a
Re: IE8 in CompatMode: Conditional Comments bug?
Hi Tereska,

The Conditional Comments switch is controlled by the value of the IE
VersionVector in the registry.

In IE8, using the Developer tool, toggle the Browser Mode - Either 7,8 or 8
Compatibility view. Note that there are no IE6 options (IE6 does not have a
version vector value).

Here is the test page that I used for testing during the Beta phase.

http://www.iecustomizer.com/msmvp/ConditionalTest.htm.

So far, with my own development (new, not legacy) I have only the one
conditional comment in my pages.

<div id="divPageWrapper">
<!--[if lt IE 6]>
<center>
<![endif]-->

...... page wire frame goes here.


<!--[if lt IE 6]>
</center>
<![endif]-->
</div>

To conveniently test your pages in all IE versions, try IETester from
http://www.debugbar.com.



"Tereska" <janecki@gmail.com> wrote in message
news:53e7f289-efa2-4af0-92a6-2838f7b8077c@d19g2000yqb.googlegroups.com...
> I have a page with script a tag in the HEAD section (just before
> conditional comments):
>
> In IE8 Standards Mode everything is OK:
> a) ie loads css file just for ie8
>
> but in IE8 Compat View (i've change mode using icon on the right of
> the address bar):
> a) ie loads BOTH css for ie7 and ie8 (but not for IE6!!)
>
> When I delete script tag (after head section) everything is OK in IE8
> standards Mode and CompatMode!! (IE loads appropriete css file)
>
> I'm using Fiddler 2 to see which css file IE loads up.
>
> Please tell me WHY this is happening?
>
> My example:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html>
> <head>
>
> <script type="text/javascript">
> // if you delete this script tag everything is OK
> </script>
>
> <title>TEST</title>
>
> <![if !IE]>
> <link type="text/css" rel="stylesheet" href="/0,style.css"/>
> <![endif]>
>
> <!--[if IE 6]>
> <link type="text/css" rel="stylesheet" href="/ie6,style.css"/
>>

> <![endif]-->
>
> <!--[if IE 7 ]>
> <link type="text/css" rel="stylesheet" href="/ie7,style.css"/
>>

> <![endif]-->
>
> <!--[if IE 8]>
> <link type="text/css" rel="stylesheet" href="/ie8,style.css"/
>>

> <![endif]-->
>
> </head>
>
> <body>
> </body>
> </html>


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
using comments Gail C microsoft.public.windows.vista.file management 4 12-23-2008 12:44
Comments about IE7 tamalita microsoft.public.internetexplorer.general 2 07-13-2008 10:15
Conditional Formatting Conditional Format Issue microsoft.public.windows.vista.general 3 03-25-2008 13:52
Conditional Copying of Files pmbasu microsoft.public.windows.vista.file management 2 12-09-2007 11:09
Microsoft Pledges Conditional Support for ODF Steve General Technology News 0 07-17-2007 15:24




All times are GMT +1. The time now is 20:40.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120