Tech Support Websites

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 24 July 2012

What is the difference between Browser Mode & Document Mode in IE

Posted on 12:10 by Unknown


If you're a web developer and your job actively involves building web pages that work the same in all browsers including the last three versions of IE, you'll be no stranger to Browser  & Document Mode in Internet Explorer
These options are available with IE Developer Tools (F12 keyboard shortcut). In IE9, these modes let you emulate older versions of IE8 & IE7. Microsoft provides these modes so that websites that were built to target IE7 & lower versions don't fail hopelessly in the newer & more standards-based versions. IE provides a fallback in the form of the Compatibility View button which allows content designed for older web browsers to render well in newer versions of Internet Explorer 9. 

Here are the differences between Browser Mode & Document Mode -
Browser Mode determines the User Agent sent to the server & the Document Mode IE defaults to.
Document Mode determines the layout (rendering engine) and the JavaScript engine. Document Mode allows you to manually choose which rendering engine you want IE to render the page with; choosing the Internet Explorer 8 Standards mode uses the IE8 rendering engine, Internet Explorer 7 Standards Mode uses the IE7 rendering engine, or Quirks Mode uses the quirky, IE5.5 rendering engine. The Chakra JavaScript engine in IE9 is not the same as that shipped in IE8.

Changing the Browser Mode refreshes the page and  changes both the Document Mode and the User Agent string, which allows Internet Explorer to lie to a server about who it says it is.
Changing the Document Mode through IE’s Developer Tools refreshes the page, but does not resend the UA string or retrieve new markup from the server.

Sites cannot choose a Browser Mode.
Site developers can choose a Document Mode for their site, which overrides IE’s defaults and declares how a website is rendered. If a site does not specify a document mode then IE assumes the default document mode, which is IE9’s standards mode in IE9.

Here's how the User Agent string looks for different combinations of  Browser Mode & Document Mode in IE9 on a Windows 7 64-bit PC -
Browser Mode:IE9, Document Mode:IE9 standards
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)

Browser Mode:IE9 Compat View, Document Mode:IE9 standards
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; MS-RTC LM 8)

Browser Mode:IE8, Document Mode:IE8 standards
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; MS-RTC LM 8)

Browser Mode:IE7, Document Mode:IE7 standards
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; MS-RTC LM 8)

Browser Mode:IE7, Document Mode:Quirks
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; MS-RTC LM 8)

Browser Mode:IE9, Document Mode:Quirks
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)

Source: MSDN & StackOverflow

Related:
How IE determines Document Mode
Using X-UA-Compatible to Create Durable Enterprise Web Applications
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Browsers, IE | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Windows 8 keyboard shortcuts
    Win + X   - context menu to access common features like Control Panel, Task Manager, File Explorer, Programs & Features, Run, Search etc...
  • What is the difference between Browser Mode & Document Mode in IE
    If you're a web developer and your job actively involves building web pages that work the same in all browsers including the last three ...
  • My 30-day personal project - watch 100 hours of Pluralsight videos
    Inspired by Matt Cutts' 30-day challenges , I plan to watch 100 hours of Pluralsight online videos to get up-to-date with current ...
  • Archive tweets & favorites with Google Reader
    There are numerous ways to archive tweets but rather than use yet another tool, I prefer using Google Reader to preserve the tweets I mark ...
  • TWIL - Week #3
    This Week I Learned: New Azure VM Image Templates include SQL Server, BizTalk Server, and SharePoint Server (2013?) images . This can be han...
  • Dashboard-like info with Browser tabs, Windows 7 Taskbar tabs
    Browser tabs & Windows 7 Taskbar tabs are turning self-aware.  This is how my browser looked the other day: I had the summary of all tha...
  • The State Of HTML5 Video
    Key points from the  The State Of HTML5 Video  report by LongTailVideo (last updated on April 19, 2012): 75% of the desktop & mobile bro...
  • Azure in Pictures - overview of Windows Azure Features, Services and Common Uses
    Download the Windows Azure Poster in PDF format (1.1MB)
  • Indian comparison shopping sites
    Did you know, India has 120 million Internet users & the Indian e-commerce market is worth $7 billion ?  Travel accounts for over 80 per...
  • Things to consider before settling on a JavaScript Library or jQuery plugin for your project
    In the article, Which JavaScript Library Should I Pick? , Pamela Fox has listed some practical points to consider before you settle on a Jav...

Categories

  • AJAX
  • Android
  • APIs
  • App
  • ASP
  • ASP.NET
  • ASP.NET-MVC
  • Azure
  • Azure SQL Database
  • AzureInPictures
  • Bing
  • Book Review
  • Bookmarklet
  • Browsers
  • C#
  • chart
  • Chrome
  • Cloud
  • CSS
  • CSS3
  • DidYouKnow
  • E-Commerce
  • Excel
  • FB
  • Fiddler
  • Firefox
  • Gadgets
  • GeoLocation
  • GMail
  • Google
  • Google Docs
  • Google Reader
  • Health
  • Hotmail
  • HOWTO
  • HTML
  • HTML/CSS
  • HTML5
  • Humor
  • Hyderabad
  • IE
  • IIS
  • India
  • Internet
  • IT
  • Javascript
  • jQuery
  • JSON
  • JSONP
  • Laptop
  • Learning Resources
  • Lists
  • Map
  • Metrics
  • Microsoft
  • miscellaneous
  • Mobile
  • NAPA
  • Office365
  • Opera
  • PDF
  • Performance
  • Personal
  • PHP
  • PM
  • PowerShell
  • Privacy
  • Programming
  • Rant
  • Safari
  • Science
  • Search Engines
  • SearchEngines
  • Security
  • SEO
  • Sharepoint
  • SharePoint2013
  • Silverlight
  • Software Engineering
  • Solutions
  • SQL Azure
  • SQL Server
  • TFS
  • Tip
  • Tips
  • Tools
  • Tools/Utilities
  • Trivia
  • TWIL
  • Twitter
  • UX
  • VM
  • VS.NET
  • VS2010
  • VS2012
  • WCF
  • WebApps
  • Websites
  • WF
  • Windows Phone
  • Windows7
  • Windows8
  • Word
  • WP7
  • WPF

Blog Archive

  • ►  2013 (112)
    • ►  October (16)
    • ►  September (14)
    • ►  August (8)
    • ►  July (8)
    • ►  June (13)
    • ►  May (12)
    • ►  April (12)
    • ►  March (8)
    • ►  February (15)
    • ►  January (6)
  • ▼  2012 (127)
    • ►  December (11)
    • ►  November (14)
    • ►  October (13)
    • ►  September (14)
    • ►  August (16)
    • ▼  July (16)
      • Book Review: SharePoint 2010 Plain & Simple
      • HOW TO make columns in an ASP.NET GridView sortabl...
      • The first 20 employees of Google
      • Power Searching with Google (and Bing)
      • What is the difference between Browser Mode & Docu...
      • HOW TO find what movies two film personalities hav...
      • Google institutes MVP/GDE award to recognize devel...
      • HOW TO work with a JSON/JSONP feed locally
      • Building a dynamic jQuery Selector for an element ...
      • NOBR - a non-standard HTML tag that all browsers s...
      • HOW TO convert HTML content to plain text - with E...
      • Websites that track traffic in Indian cities
      • Web Apps Watch - 2
      • NLPCaptcha - yet another CAPTCHA implementation
      • Free APIs for HTML5 Geolocation apps, mashups
      • HOW TO read long text messages on the Samsung Omni...
    • ►  June (6)
    • ►  May (5)
    • ►  April (11)
    • ►  March (12)
    • ►  February (7)
    • ►  January (2)
  • ►  2011 (98)
    • ►  December (5)
    • ►  November (2)
    • ►  October (5)
    • ►  September (7)
    • ►  August (7)
    • ►  July (15)
    • ►  June (10)
    • ►  May (7)
    • ►  April (8)
    • ►  March (10)
    • ►  February (11)
    • ►  January (11)
  • ►  2010 (163)
    • ►  December (14)
    • ►  November (19)
    • ►  October (19)
    • ►  September (15)
    • ►  August (18)
    • ►  July (17)
    • ►  June (20)
    • ►  May (17)
    • ►  April (19)
    • ►  March (5)
Powered by Blogger.

About Me

Unknown
View my complete profile