The latest version of the Microsoft web browser – Internet Explorer 9. Here are just some of the new features to be added to IE9:
If you've just downloaded IE9 RC and found that your website no longer works or the layout has become skewed, don't panic!
Whilst you continue working on the updates needed to meet IE9 compatibility you can add some code to the pages concerned or even the entire site in order to force IE 9 to display your page(s) in a previous version compatibility mode.
By default IE 9 will read your web page DOCTYPE to determine the compatibility mode in which to render the page.
If your web page doesn't include a DOCTYPE or you need to over-ride the default IE9 behaviour you can do this in a number of ways;
1. Add a meta tag to the page(s) you wish IE9 to render in a previous compatibility mode:
To emulate IE8 mode use :
To emulate IE7 mode use :
and so on.
If you are able to edit or add additional HTTP headers to be output by your web application then perhaps the best method method is to use the X-UA-Compatible header:
Apache 2.2
PHP
Use the header() function to send a custom header. This function MUST be called before any other output is started.
- HTML 5 (Working Draft)*
- W3C Cascading Style Sheets Level 3 Specification (Working Draft)
- Scalable Vector Graphics (SVG) 1.0 Specification
If you've just downloaded IE9 RC and found that your website no longer works or the layout has become skewed, don't panic!
Whilst you continue working on the updates needed to meet IE9 compatibility you can add some code to the pages concerned or even the entire site in order to force IE 9 to display your page(s) in a previous version compatibility mode.
By default IE 9 will read your web page DOCTYPE to determine the compatibility mode in which to render the page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
1. Add a meta tag to the page(s) you wish IE9 to render in a previous compatibility mode:
To emulate IE8 mode use :
< meta http-equiv = "X-UA-Compatible" content = "IE=EmulateIE8" > |
< meta http-equiv = "X-UA-Compatible" content = "IE=EmulateIE7" > |
If you are able to edit or add additional HTTP headers to be output by your web application then perhaps the best method method is to use the X-UA-Compatible header:
Apache 2.2
First, you need to make sure that the headers_module is loaded during server initialization. In the httpd.conf file, uncomment the line by removing the “#” at the start of the LoadModule line for headers_module. When complete, it should readas below.
LoadModule headers_module modules/mod_headers.so
To add the header to all pages on the server, add thefollowing line to the httpd.conf file after the LoadModule lines.
Header set X-UA-Compatible “IE=EmulateIE8” |
Use the header() function to send a custom header. This function MUST be called before any other output is started.
//set IE mode header header( 'X-UA-Compatible: IE=EmulateIE8' ); |
No comments:
Post a Comment