Jump to content
bogdi19

How CSS Compatibility Mode Hack works for IE8

Recommended Posts

Microsoft is finally up with the latest version of internet explorer – IE8. So if you are still to check your website compatibility over the same, be prepared for some kind of wicked surprises. Every version of IE when hit the market didn’t conform to the web standards, which often poses cross browser compatibility issues to the web designers. The present IE is pretty complaint in terms of compatibility benchmarks, but since many of the websites were developed using the CSS ‘hacks’ for the earlier versions.

Microsoft therefore had to come up with compatibility mode which is also called as compatibility view to address this issue. With the help of this mode IE8 and future coming versions will not find the issue of cross browser compatibility.

The compatibility mode: By default you can see the IE8 and the advance versions cater the web pages as per the modern benchmarks, so that this may help the designers to write the code compliant to CSS and HTML. Hence with such thing in place, the older websites will not be able to display using the latest version of internet explorer. To enable to do this, you need to either do the coding again or simply add some browser features which cater these websites the same fashion as the previous versions performed. However, Microsoft has added such feature which is known as compatibility mode or compatibility view. If you click a button over the browser or the web designer simply adds a one line code to a page, IE8 and the future versions will be able to use the older version to display the web page.

The tag for compatibility mode: In order to make your web page compatible with any modern versions of browser you need to add a metatag which are X-UA-compatible. To add this metatag to any webpage, you have to insert the following text or code to the section in all the tags excluding the tag and the other metatags.-

meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"

The version of internet explorer in the metatag must match to the version of your browser compatibility. ‘IE=5’ in the text corresponds both to the browser versions IE 5 and IE6 comptabilble code, and the "IE=7" is used to get enhanced results with IE 7 and IE 8, which would compel the browser to employ existing standards.

The compatibility view button: If any website is coded with the older versions of IS and do not have the X-UA-Compatible metatag, any visitor using IE8 will see a broken page icon in the address bar. And when the user clicks at this icon it will bring him in the compatibility view at the visited webpage. The IE also gives you a list of websites which employ the compatibility view, so anyone visiting any website does not have to click on this button every time he or she visits them. Hence when a visitor clicks that icon he is just updating the site with this compatibility view using the metatag, which eventually makes it compatible.

The HTTP header: If your complete website is compatible with any particular version of internet

explorer, you can also try of using HTTP header to update the browser. The header comes in the

following way:

X-UA-Compatible: IE=EmulateIE7

You can do this by simply inserting any particular IE version for the website the way you add the

metatag. You can update the HTTP header with IE8 in the same way you update your website to make it compliant to any advance browser. In this way the repeat visitors can view your site without any hassle or issue.

With these ways as discussed in the article you can make the CSS compatibility mode hack work for the latest version of internet explorer – IE8. The changes to CSS compliance in IE 8 discussed above can only work if your web page is in IE8 standard mode or simply emulates IE 8 with this latest version. Keep

on exploring the topic for a complete insight of the topic, however, the methods discussed above shall suffice all your needs and address the problem.

Sursa: Ethical Hacking-Your Way To The World Of IT Security

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...