Accelerators
Accelerators are contextual services that quickly access a service from any webpage. Users often copy and paste from one webpage to another, but Internet Explorer 8 Accelerators make this easier.
Accelerators enable users to find information without leaving the current webpage. For example: a user is interested in a restaurant and wants to see its location. By selecting the address, the user can view a preview of the map, with an option to click to a full webpage with additional information from a mapping service.
Accelerators can also be used to send information to a service. For instance: a user reads an interesting article and wants to blog about a portion of the article. The user can select a portion of the article and use a blog Accelerator to navigate to the user's blog site with the selected text already available in the Edit field.
Users can access an Accelerator by simply selecting content and clicking the button that appears next to the selection. Alternatively, users can access Accelerators from the context menu for selections, links, and the current webpage. Accelerators for the current webpage are also available from All Accelerators on the Page menu.
Accelerators are services that the user can install and manage. Users can install them from the Internet Explorer Gallery or through any website that advertises Accelerators.
Accelerators are described by an XML file that provides the interface of how the browser should communicate with the service through URL templates. Web-based services should take advantage of XML-based Accelerators, since they are easy to create, test, and deploy to users.
This is a simple sample that shows a map Accelerator that you can host on a website:
Create the Accelerator XML file: Copy the sample code below to a text editor and save it as "GetMap.xml". The code below describes the functionality of the Accelerator.
<?xml version="1.0" encoding="UTF-8"?>
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
<homepageUrl>http://maps.live.com</homepageUrl>
<display>
<name>Map with Windows Live</name>
<icon>http://www.live.com/favicon.ico</icon>
</display>
<activity category="map">
<activityAction context="selection">
<preview action= "http://maps.live.com/geotager.aspx">
<parameter name="b"
value="{selection}"/>
<parameter name="clean"
value="true"/>
<parameter name="w" value="320"/>
<parameter name="h" value="240"/>
</preview>
<execute action="http://maps.live.com/default.aspx">
<parameter name="where1" value="{selection}" type="text" />
</execute>
</activityAction>
</activity>
</openServiceDescription>
Host the install button by adding this code example to the website on which you want to advertise the Accelerator.
<button onclick="javascript:window.external.addService('GetMap.xml')">Add Map Activity</button>
Test the accelerator:
Install the Accelerator by clicking Install on your website. This launches the installation dialog box.
Select the Make this my default provider check box. This sets the Accelerator to appear in the top listing.
Go to a site that contains a street address.
Select the address and click the button that appears next the mouse cursor. (Alternatively, you can right-click to get the context menu.)
Hover over the Map with Live Maps Accelerator. This displays the preview of the map Accelerator.
Click the Map with Live Maps Accelerator. This navigates to the map website in a new tab.
For more information, see OpenService Accelerators Developer Guide.
return to top
Web Slices
Web Slices is a new feature enabling websites to connect to their users by allowing them to subscribe to content directly within a webpage. Web Slices behave just like RSS feeds; users can subscribe to get updates and be notified of changes.
A Web Slice is a section of a webpage that is treated like a subscribable item, just like a feed. To enable a Web Slice on your website, annotate your webpage with class names for the title, description, and other subscribable properties.
Users can discover Web Slices within a webpage and add them to the Favorites bar, a dedicated row below the Address bar enabling easy access to links. Internet Explorer 8 subscribes to the webpage, detects changes in the Web Slice, and notifies the user of updates. Users can preview these updates directly from the Favorites bar and click through to the website to get more information.
WebSlice Authoring
Web Slices are enabled by adding HTML annotations directly to the webpage. Web Slices use a combination of the hAtom Microformat and the Web Slice format to describe a subscribable portion of a webpage.
The Basics
The basic properties of a Web Slice are the Web Slice container, title, and content.
WebSlice
Required
Uses class name hslice
The Web Slice element must include an ID
Represents the entire region of a Web Slice that contains the title, description, and other WebSlice properties
Entry Title
Entry Content
Optional
Uses class name entry-content as defined in the hAtom Microformat
If the Entry Content is missing, assume it is an empty string
There can be multiple instances of Entry Content
This is an example of how to mark up an auction item with the link, title, and description properties
http://www.auction.microsoft.com/item
<div class="hslice" id="auction">
<p class="entry-title">item - $66.00</p>
<div class="entry-content">high
bidder:buyer1
…
</div>
</div>
For more information, please see Subscribing to Content with Web Slices and Web Slice Style Guide.
return to top
CSS 2.1 Compliance
Style Sheets
Cascading Style Sheets (CSS) is a simple mechanism for adding style (such as fonts, colors, spacing, positioning) to web documents. Before the introduction of CSS, stylistic properties were set directly within HTML with different attributes. With CSS, authors can separate a page's data (specified in HTML) from the display logic, thus improving markup organization and facilitating easier site maintenance.
The W3C CSS working group has made great strides toward converging on a final specification for CSS 2.1. At the time of this writing, the specification status is "Candidate Recommendation." The main goal of this effort is to enable web developers and designers to write their pages once and have them render properly in many browsers. The new Developer Tools included with Internet Explorer 8 will also help in this endeavor. Internet Explorer 8 supports the latest feature set as defined in the specification.
While one of the main goals for Internet Explorer 8 is CSS 2.1 compliance, it is also forward-looking toward CSS3. CSS 3 is the next step in the evolution of Cascading Style Sheets, and unlike CSS 2.1, which consists of one single document, the CSS 3 specification is broken down into different modules to speed up the process of converging on clear specifications and implementations of different features. Additionally, CSS 3 hopes to further clarify some of the ambiguities in the CSS 2.1 specification while providing new features to web authors. Internet Explorer 8 hopes to implement some of the most requested CSS 3 features by web developers and designers.
See CSS Improvements in Internet Explorer 8 for more information.
return to top
Data URI Support
Data URIs offer web developers the opportunity to embed small external resources (like CSS files or images) directly into a URL on a webpage:
<img alt="Image fed from data url" src="data:image/png;base64,iVBORw0KGgoAAA..." />
The primary use case for data URIs is the encapsulation of a binary file inside an URL (a stylesheet or image). Because the binary file can be represented inline as a string, it may be saved to the local store and retrieved at a later time without needing to fetch anything from the network.
Data URIs also offer an alternative to traditional URIs in that they don't require a separate download. This is advantageous in scenarios where sub-downloads are blocked or unavailable.
The Internet Explorer 8 data URI implementation attempts to balance security with functionality.
For more information, see the developer documentation for Data URI Support on MSDN.
return to top
Printing Improvements
Internet Explorer 8 includes several print enhancements. These form the basis for a full implementation of CSS 2.1 pagination recommendations, and provide authors with more control and functionality in the print medium. In particular, support has been added for the following printing constructs:
@page rule
left,right and first page selectors
"avoid", "left", and "right" values for page-break-after and page-break-before properties
page-break-inside property
widows property
orphans property
These improvements give developers greater control over how content is paginated across finite views. Developers can specify margin area, portions of content that must be kept together or split across pages, and much more. With this in mind, readability of printed web content can be greatly improved.
For more information, see CSS How-to: Optimize Pages for Printing Using CSS on MSDN.
return to top
Alternate style sheets
Internet Explorer 8 supports alternate style sheets. Specified by CSS 2 and HTML4, they allow page authors to define and name styles for a page (for example, to demo different design options to customers), to allow users to select a presentation style that suits their needs, or to display a document with or without annotations.
By using the Style commands (available from the Page or View menus), the user can select among the style sheets exposed by a website or disable style entirely.
Deprecating CSS expressions
Also known as dynamic properties, this non-standard CSS extension introduced in Internet Explorer 5 supports the definition of property values by using JavaScript or VBScript expressions. While powerful, this feature was never standardized, has a high performance cost and increases the browser's attack surface. Moreover, its main usage scenario has been to work around CSS bugs and limitations in Internet Explorer (for instance, to simulate max-width or pseudo-classes like : first-child). These workarounds will be redundant in Internet Explorer 8.
Starting with Internet Explorer 8, CSS expressions are no longer supported in standards mode.
Using the –ms prefix
Internet Explorer 8 introduces the -ms prefix for some non-CSS 2.1 properties. Prefixes are used in CSS for all vendor-specific properties. Previous versions have not required or accepted the prefix on Internet Explorer-only non-standard properties. Internet Explorer 8 is changing that. It is important to update your site if it uses any of these properties.
The following properties should be used with a prefix:
-ms-accelerator
-ms-background-position-x
-ms-background-position-y
-ms-behavior
-ms-block-progression
-ms-filter
-ms-ime-mode
-ms-layout-flow
-ms-layout-grid
-ms-layout-frid-char
-ms-layout-grid-line
-ms-layout-grid-mode
-ms-layout-grid-type
-ms-line-break
-ms-interpolation-mode
-ms-overflow-x
-ms-overflow-y
-ms-scrollbar-3dlight-color
-ms-scrollbar-arrow-color
-ms-scrollbar-base-color
-ms-scrollbar-dark-shadow-color
-ms-scrollbar-face-color
-ms-scrollbar-highlight-color
-ms-scrollbar-shadow-color
-ms-scrollbar-track-color
-ms-text-align-last
-ms-text-autospace
-ms-text-justify
-ms-text-kashida-space
-ms-text-overflow
-ms-text-underline-position
-ms-word-break
-ms-word-wrap
-ms-writing-mode
-ms-zoom
The following CSS3 properties should be used without a prefix:
box-sizing
rubyAlign
rubyOverhang
rubyPosition
return to top
Using filters
Due to its proprietary non-standard syntax, Microsoft strongly recommends that new filter declarations use the quoted -ms-filter property syntax, which requires the filter to be quoted. For instance, instead of the following:
filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80,FinishOpacity=70,Style=2);
Use:
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80,FinishOpacity=70,Style=2)";
Note that -ms-filter property values must be quoted. Internet Explorer 8 will process existing unquoted filter declarations such as the one in the example above. However, the property will be applied if and only if its syntax is valid (all parentheses are present). If not, standard CSS 2.1 error recovery rules will apply and the property will no longer apply to your document. This may result in different rendering than Internet Explorer 7.
Encoding Detection
Prior to Internet Explorer 8, Internet Explorer defaulted to the code page of the referring document to decode a style sheet. Internet Explorer 8 now complies with the CSS 2.1 style sheet representation priorities defined by the standard. You now have the ability to control character set decoding by using the charset attribute of the link element or the charset parameter of the HTTP Content-Type header. This level of control may be especially relevant for those style sheets that use generated content.
CSS Compatibility
One of the most important goals of Internet Explorer 8 is to be the most standards-compliant version of the browser ever. Please see CSS Compatibility and Internet Explorer for details about CSS compliance in recent versions of Internet Explorer, including support in Internet Explorer 8.
return to top
Accessibility Features
WC3's ARIA Support
The W3C defines ARIA (Accessible Rich Internet Applications) as syntax for enabling people with disabilities to access dynamic web content and custom UIs. Internet Explorer 8 uses ARIA role, state, and property information to communicate with assistive technologies. Instead of building separate simplified webpages for accessibility, use ARIA to mark up your rich web applications with roles, states, and properties. For example, to match the behavior created through a script, you can define a div element as a button, checkbox, or another ARIA role.
To learn more about ARIA and how to use it in your web content, use the following W3C ARIA working drafts:
UI Automation Support
User Interface Automation (UIA) is the Accessibility and Software Test Automation API. It was introduced in Windows Vista and .NET Framework 3.0, and is supported in Windows XP and later. Through UIA, Internet Explorer 8 relays to Assistive Technologies the ARIA markup information that supersedes the MSAA (Microsoft Active Accessibility) information set. For example, the minimum and maximum values of a custom webpage slider control are marked up using ARIA.
Because MSAA does not implement the concept of a slider, Assistive Technologies cannot get the information they need through MSAA. However, when communicating with Internet Explorer 8 through UIA, Assistive Technologies can access the behavior of the control and its values.
The following webpages provide information on the background, implementation, and use of UIA:
See Mapping ARIA Roles, States, and Properties to UI Automation for more information.
For more Accessibility features please check out Caret Browsing and Zoom.
Better AJAX Development
Improving developer productivity was one of the primary goals for Internet Explorer 8. The Internet Explorer team set out to achieve this goal in part by providing cross-browser interoperability, compliance with standards, and additional powerful APIs.
Internet Explorer 8 offers a simple and powerful programming model for AJAX development, encompassing interaction between browsers, webpages, and servers. As a result, you will find it easier to build webpages that provide improved user experience, greater functionality, and better performance. These APIs are based on web standards as defined in the W3C HTML 5 Working Group and the W3C Web Applications Working Group.
The following AJAX improvements bridge the browser-webpage gap to help you create a better user experience:
AJAX navigations enable users to navigate back and forth without leaving the AJAX application (webpage), and can be used to save the state of the AJAX application in the Address bar. This allows websites to trigger an update to browser components, such as the Address bar, by setting the value of window.location.hash, which raises an onhashchange event to alert components in the webpage to alter their state, as well as creating an entry in the travel log.
DOM storage is a simple-to-use method for storing and retrieving strings of key-value pairs. Data can be stored per tab instance of a session or stored on the local machine. This allows pages to cache text on the machine, reducing the effect of network latencies by providing faster access to pre-cached data. Several innovative uses are possible, such as in combination with the new network connectivity event, to allow a page to cache data if it detects that the computer is offline. Data URIs (which are text strings) can also be easily cached on the local machine.
Connectivity events allow websites to check whether a user is connected to the network through the window.navigator.onLine property, and to get notified of connectivity changes by way of the ononline and onoffline events.
Six connections per host for broadband scenarios instead of two, and a scriptable property, improve performance by allowing parallelization of downloads in Internet Explorer 8. This also increases functionality by ensuring that a request is not blocked to a host if two connections already exist. Websites can optimize downloads based on the window.maxConnectionsPerServer property.
XMLHttpRequest enhancements include a timeout property that can be set to cancel the request if necessary, allowing developers to better manage long-running synchronous and asynchronous requests.
Cross-domain communication is an integral part of AJAX development and mashup web applications. To help you build cross-domain communications that are safe and easy to implement, Internet Explorer 8 includes these three features:
With cross-domain request (XDR), developers can create cross-site data aggregation scenarios. Similar to the XMLHttpRequest object but with a simpler programming model, the XDomainRequest object is the easiest way to make anonymous requests to third-party sites that support XDR and opt into making their data available across domains. Because the XDomainRequest object ensures that the server and client explicitly opt-in, data aggregation for public sites (such as blogs) is simple, secure, and fast. As announced, XDR integrates with the Access Control framework from the W3C Web Applications Working group for cross-domain data that is "public"—that is, not user-specific.
Cross-document messaging (XDM) APIs allow easy, secure, and standardized communication through IFrames between documents from different domains with one simple call to the postMessage method.
Cross-domain security is further enhanced with an HTML sanitizer called toStaticHTML, which filters potentially harmful HTML content. Additionally, Internet Explorer 8 fully supports the ECMAScript 3.1's JSON parser. Developers can use the native JSON.parse and JSON.stringify APIs to safely translate between JavaScript objects and JSON data. By removing potentially harmful content, these parsing features go a long way toward securing the end user. Both toStaticHTML and JSON can be used with XDM, XDR and XHR, among other features in Internet Explorer 8.
For code samples and more information on these features, please refer to the AJAX pages in the Internet Explorer 8 SDK. MSDN also contains documents for the APIs listed above.
return to top
DOM Improvements
Internet Explorer 8 has resolved many of the Document Object Model (DOM) inconsistencies found in previous versions of Internet Explorer with its new standards mode rendering engine. Developers who choose to opt out of this rendering mode can use IE7 compatibility mode for interoperability with legacy content by adding the <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"> tag in the document's <head> element (or send the equivalent HTTP header on the server).
Internet Explorer 8 makes significant progress toward compliance and interoperability with W3C DOM standards. To improve JavaScript programming interoperability with the DOM standards, Internet Explorer 8 includes many fixes for standards-compliance issues in the implementation of the DOM L1 & 2 Core specification, as well as the DOM L2 HTML specification.
A few examples of common bugs that have been fixed in the Internet Explorer 8 DOM include the following:
Interoperable handling of HTML 4 elements: P, OBJECT, Q, LABEL (supports intrinsic labels)
Interoperable object-as-image support
Unified implementation of HTML markup attribute handling APIs (getAttribute, getAttributeNode, etc.) to handle content attribute names: class, style, event handlers, etc.
Absolute/relative URL consistency between DOM attributes and content attributes
Boolean attribute handling
Title attribute for tooltips only
Full checkbox and radio button support (name attribute fully supported in dynamic scenarios)
Positioning APIs no longer include the 2px border
See HTML Enhancements in Internet Explorer 8 for more information.
return to top
Native JSON Support
JavaScript Object Notation (JSON) is a simple and lightweight data-interchange format based on a subset of the object literal notation of the JavaScript language. The JScript engine shipped with Internet Explorer 8 implements the ECMAScript 3.1 JSON proposal for native JSON-handling functions (which uses Douglas Crockford's json2.js API).
Native support for JSON is achieved by introducing a global JSON object with two built-in methods— stringify and parse. The new global built-in JSON object is defined in the JScript engine and is created during the engine initialization phase.
The global JSON object is similar to any other intrinsic global object in the JScript engine like Math, Date, and so on, and can be modified or overridden by the developer. If a user overrides the JSON object with a self-defined JSON object, the user-defined object takes precedence over the built-in JSON object. In such a scenario, the user needs to implement the stringify and parse methods on the self-defined JSON object because the built-in methods are no longer be accessible to the user-defined JSON object.
The JSON.stringify method serializes a JScript value and returns a representative JSON text string, while the JSON.parse method de-serializes a JSON text string and safely revives it into a JScript object.
Because it is a native implementation and one which removes the dependency on the JScript eval method to "revive" JSON strings back into JScript objects, this implementation is both fast (for both serialization and deserialization of data) and secure compared to equivalent framework implementations.
Impact on existing websites
To maintain backward compatibility, this feature is only available when a site chooses to use the latest version of JScript features by using the “Internet Explorer 8 Standards” layout (document) mode. This feature might affect the behavior of webpages that depend on a global variable JSON or use json2.js. Though the global JSON object can be overridden, when a page chooses to use the “Internet Explorer 8 Standards” layout (document) mode it is not an undefined object anymore. With JSON now being instantiated as a global name by the JScript engine, checks like if(!this.JSON) would now evaluate to false and would need to be changed appropriately in the user code.
The webpages that use json2.js are unlikely to be affected. With very few exceptions, all these pages will continue to work, and likely work faster. These exceptions are due to the differences that exist between the Internet Explorer native JSON implementation and json2.js. For example, during serialization the native JSON implementation detects cycles and does not go in infinite recursion like json.js. You can find more about these exceptions at the JScript Blogs.
For more information, refer to the JSON Documentation and see Versioning and JScript Engine’s Version Support.
return to top
Mutable DOM Prototypes
Web applications have come a long way since the static webpage. Today, web developers need improved programming functionality, flexibility, and features to enable them to build the next generation of web applications. The Internet Explorer web platform provides many of the features and functionality necessary to build those applications. Where the web platform's built-in support ends, JavaScript—the principal scripting language used on the web—is often used to code innovative new features that supplement the web platform, cater to website-specific scenarios, normalize differences between browsers, and so on.
To provide web developers with the programming tools necessary to build new JavaScript scenarios that innovate, extend, and build upon the web platform, Internet Explorer 8 offers a collection of features that extend some of JavaScript's advanced functionality into the Document Object Model (DOM).
DOM Prototype support
Internet Explorer 8 extends the semantic capability of JavaScript prototypes into the Document Object Model (DOM). When web developers wish to interact with a webpage through JavaScript, they must use and interact with DOM objects, which are not part of the core JavaScript language. In previous versions of Internet Explorer, the DOM only provided object "instances" to the JavaScript programmer. For example, the DOM createElement property creates and returns an element instance, as in the following:
var div = document.createElement('DIV'); // Returns a new instance of a DIV element
This div instance is “derived” from a prototype that defines all of the properties that are available to that instance. Prior to Internet Explorer 8, the JavaScript constructor and prototype objects for div instances (and all other instances), were not available to the web developer. Internet Explorer 8 (when running in IE8 standards mode) reveals the constructor and prototype objects to JavaScript. In addition to allowing the customization of DOM object instances by way of their prototypes, DOM prototypes also help to clarify the internal representation of the DOM and its unique hierarchy in Internet Explorer, compared to other browsers.
For more information, see DOM Prototypes Part I: Introduction. For the complete list of DOM prototypes with their properties and methods, see the Prototypes reference page
Getter/setter support
An accessor (getter/setter property) is a new type of JavaScript property available in Internet Explorer 8. By using accessor properties, web developers can create or customize dynamic data-like properties that execute JavaScript code when their values are accessed or modified. The DOM prototype hierarchy defines all of its properties as built-in accessors. Web developers can also customize DOM built-in accessors to fine-tune the default behavior of the DOM.
Internet Explorer 8 is the first browser to implement support for the ECMAScript 3.1 standard syntax for creating accessor properties (Object.defineProperty).
For more information, see DOM Prototypes Part II: Accessor (getter and setter) Support.
return to top
Selectors API
Selectors are a query language for searching and "selecting" tags
(elements) within a webpage. They are most commonly seen in CSS to
"select" a group of elements to which certain properties will be
applied:
Selector
{
property: value;
property2: value;
}
In Internet Explorer 7, there is no way of "executing" the selector independently of CSS. The Internet Explorer 8 implementation of the Selectors API is based on the specification of the W3C Web Applications Working Group:
http://www.w3.org/TR/selectors-api/
See Selecting Objects with JavaScript for more information.
return to top
Improved Namespace Support
Internet Explorer 8 offers web developers the opportunity to write standards-compliant HTML-based webpages that support features (such as SVG, XUL, and MathML) in namespaces, provided that the client has installed appropriate handlers for those namespaces via binary behaviors. (A binary behavior is a type of ActiveX control.)
Internet Explorer 5 through Internet Explorer 7 provides limited element namespace support. (This support keeps the parser from treating namespaced elements as native HTML elements.) By using element namespaces, web developers can apply behaviors to those elements through special HTML markup (called HTML Components or HTCs), and COM developers can apply binary behaviors. Only elements in a namespace can have binary behaviors applied to them.
Internet Explorer 8 improves its namespace support by supporting default namespace declarations on elements not included in the set of known HTML tag names.
<html>
<body>
<newtag xmlns="http://my/namespaceURI">
<folder>Hello</folder>
</newtag>
</body>
</html>
In the previous example, both the "newtag" and "folder" elements will be treated as namespaced elements in Internet Explorer 8.
See Namespace Support in Internet Explorer for more information.
return to top
Versioning
Versioning and Internet Explorer modes
Versioning and Internet Explorer rendering modes enable Internet Explorer 8 to remain compatible with today's web content. These modes also provide a mechanism for introducing new features and stricter standards of compliance.
Internet Explorer 8 has three different layout modes:
Quirks: backwards compatibility with Internet Explorer 5 rendering behavior
Internet Explorer 7 Standards: backwards compatibility with Internet Explorer 7 JavaScript and layout behavior
Internet Explorer 8 Standards: latest features, including the CSS 2.1-compliant layout engine and DOM/HTML breaking changes
By default, Internet Explorer will attempt to display content by using its most standards-compliant mode: Internet Explorer 8 Standards mode. To allow the existing site content to remain compatible with Internet Explorer 8, site operators may designate the correct layout mode for Internet Explorer 8 clients by using a new compatibility mode switch.
For more information, see Defining Document Compatibility.
Versioning and Cross-Document Interaction
Internet Explorer 8 introduces the Internet Explorer 8 Standards mode by default; this allows web designers to use the latest rendering features available in the browser. In addition to layout changes, Internet Explorer 8 Standards mode will also affect the behavior of scripted APIs (DOM). To opt out of Internet Explorer 8 Standards mode, the meta tag may be used to obtain Internet Explorer 7 Compatibility mode:
<meta http-equiv="X-UA-Compatible" content="IE=7">
Internet Explorer 8 introduces the Internet Explorer 8 Standards mode by default; this allows web designers to use the latest rendering features available in the browser. In addition to layout changes, Internet Explorer 8 Standards mode will also affect the behavior of scripted APIs (DOM). To opt out of Internet Explorer 8 Standards mode, the meta tag may be used to initiate Internet Explorer 7 Compatibility mode:
Versioning of the DOM APIs introduces additional complexity for web developers who interact through script with framesets and inline frames, HTC files (element behaviors), and various HTML dialogs that are in different modes. For example, a frame that is in Internet Explorer 8 Standards mode may interact with another frame that is in Internet Explorer 7 Compatibility mode. Script authors must understand how versioning will affect DOM APIs that have different behaviors when invoked across document boundaries. The following scenarios illustrate these behaviors:
A single webpage may host one or more IFrames that contain documents of different modes. For example, a webpage in Internet Explorer 7 Compatibility mode (such as a portal) may host newer Internet Explorer 8 Standards mode content.
A webpage may create a new window or dialog (for example, through window.open) that loads content from a document of a different mode. The webpage then proceeds to call DOM APIs on that new window.
Other scenarios, such as frameworks and mashups injected through document.write or <script src="framework.js">, are not explicitly handled by cross document versioning because they do not involve the creation of a new document. In these scenarios, web developers must author their content carefully so that it works well with any document mode.
For more information, see Defining Document Compatibility.
Versioning and JScript Engine’s Version Support
Versioning of language feature sets in the JScript engine allows Internet Explorer 8 to remain compatible with today's web content while developers update the content to use the newly introduced feature set. For Internet Explorer 8, the versioning support for JScript features is exposed and controllable through the Internet Explorer layout (document) mode.
The JScript engine shipped in Internet Explorer 8 supports two different versions:
Version 5.8: latest features, including native JSON support, accessor property for mutable DOM prototypes and JScript breaking changes. The JScript engine uses this version of language support when a page uses the layout mode as “Internet Explorer 8 Standards” mode.
Version 5.7: backwards compatibility with Internet Explorer 7 JScript behavior. The JScript engine uses this version when a page uses the layout mode as anything other than the "Internet Explorer 8 Standards" mode.
By default, Internet Explorer will attempt to display content by using its most standards compliant mode—the Internet Explorer 8 Standards mode. To allow the existing site content to remain compatible with Internet Explorer 8, site operators may designate the correct layout mode for Internet Explorer 8 clients by using a new compatibility mode switch.
For more information, see Defining Document Compatibility
Update your site to render in IE7 Mode
You may experience one of the following issues when you use Internet Explorer 8:
Misaligned webpage layout
Overlapping text or images
JavaScript functionality issues and errors
These issues may occur because Internet Explorer 8 displays webpages using "Standards mode" by default, whereas most current webpages are created and tested to work with Internet Explorer 7 Standards mode.
Getting Internet Explorer 8 to always render a site or page like Internet Explorer 7 can be done by simply adding a tag. No additional changes are required.
There are two options for doing this:
On a per-site basis
The site owner can add the HTTP header:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
On a per-page basis
The site owner can add a special HTML tag to each document, right after the tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
The meta tag retains Internet Explorer 7 rendering behavior while still accessing all Internet Explorer 8 has to offer. This allows your site visitors who are using Internet Explorer 8 a seamless experience while you work behind the scenes to update your web properties. When your site is updated to render in Internet Explorer 8, you can remove the tag or continue to leverage the tag functionality, as it will remain as part of Internet Explorer 8 upon final release.
Note: Adding the Internet Explorer 7 compatibility tag should address most display issues. However, browser detection may also have to be updated on your site. To learn more, please read about the User-Agent String and Version Vector.
For more information on this specific meta tag update please see Some Web sites may not be displayed correctly or work correctly in Windows Internet Explorer 8. Other compatibility options are described in Internet Explorer Compatibility.
return to top
Internet Explorer 8 includes tools needed by web developers to efficiently debug and profile their sites directly in the browser. Instead of switching between the browser and a separate development environment, developers can immediately debug a site's HTML, CSS, and JScript from within the browser. The built-in JScript profiler helps developers better understand and therefore improve a site's performance.
Internet Explorer 8 Developer Tools, which provide visibility into the browser's internal representation of the site rather than just a source view, also help to determine why a site does not render or behave as expected. By simplifying editing a site, Internet Explorer 8 Developer Tools make experimentation and iterative development easy. This enables rapid prototyping and helps developers improve their skills.
For more information, see Discovering the Internet Explorer 8 Developer Tools on MSDN.
return to top
Improved Protected Mode API Support
Internet Explorer 8 makes it easier for developers to programmatically start, maintain, and interact with a protected mode Internet Explorer process. Building on the User Account Control (UAC) integration in Internet Explorer 7, the IWebBrowser2 interface provides new process creation methods that properly conform to user privilege levels. With a low-cost change to existing code, developers can now spawn and control protected mode Internet Explorer processes while avoiding confusing workarounds.
Internet Explorer 8 also provides new broker functions that allow access between applications, processes, and resources secured to other integrity levels in Windows Vista. For example, medium-integrity applications can access protected mode cookies. In addition, protected mode Internet Explorer processes—including browser extensions and Browser Helper Objects (BHOs)—have limited access to registry keys and low-integrity file locations.
For more information, refer to the Protected Mode Internet Explorer Reference on MSDN.
return to top
Script Error Improvements
Aside from a much-needed user interface (UI) refresh of the script error dialog box, Internet Explorer 8 fixes two substantial bugs in the reporting of script errors: script errors now correctly identify both the resource and line number of the offending script. Previously, when not debugging, Internet Explorer was unable to correctly report which external resource file (*.js) was generating the script error. Line numbers were also frequently off by one. Together, the fixes to these problems allow web developers to quickly and accurately identify problem areas during web development, whether using a debugger or not.
return to top
Circular Memory Leak Mitigation
Internet Explorer 8 includes improvements to memory management.
These improvements mitigate memory leaks that were previously
created by circular references between JScript objects and DOM
objects.
This feature may affect the behavior of webpages that depend on
garbage memory that, only as the result of a memory leak, existed in
previous versions of Internet Explorer. In Internet Explorer 8,
these pages will reference unallocated memory and generate a fault.
This feature affects each website displayed in Internet Explorer 8
regardless of the site's chosen rendering mode.
See
Circular Memory Leak Mitigation for more
information.
return to top
User Preference Protection Settings
Internet Explorer 8 includes the User Preference Protection feature, a feature that puts users in charge of their default search provider and allows them to approve any changes to the default provider before they are made. See End User Features for more details.
In Internet Explorer 7, the default search provider is stored in the DefaultScope registry key (in HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes). Applications that write to this key will continue to work in Internet Explorer 8; however, the user will be prompted to approve any change to their default provider the next time an Internet Explorer window is opened.
If multiple programs write to the DefaultScope registry key before a new Internet Explorer window is opened, the last writer (of the registry key) will prevail, in that the new search default requested in the last registry write will be presented to the user.
Developers are encouraged to use the new IOpenService interface (defined in openservice.idl) to request a change to the search default. The user will be presented with an approval dialog box immediately when the API is called. The Application Name and Publisher of your application (obtained from the calling DLL) will be displayed in this dialog box.
#include <openservice.h&>
HRESULT hr;
CoInitialize(NULL);
CComPtr<IOpenServiceManager> pServiceManager;
hr = pServiceManager.CoCreateInstance(CLSID_OpenServiceManager);
CComPtr<IOpenService> pService;
// Install the provider to get an IOpenService pointer.
hr = pServiceManager->InstallService(MYSEARCHSERVICEURL, &pService);
hr = pService->SetDefault(TRUE, NULL);
CoUninitialize();
return to top
Platform Performance Improvements
Internet Explorer 8 incorporates several changes that improve the performance of websites. These changes affect many Internet Explorer subsystems, including the HTML parser, CSS rule processing, markup tree manipulation, and the JScript garbage collector and runtime. In addition, with a three-fold increase in the number of allowable parallel downloads, Internet Explorer 8 can change the download order of webpage elements.
The majority of these changes will affect performance only, with little or no impact on functionality of most websites. However, the changes might expose those aspects of websites that depend on the timing of operations or on browser performance. In addition, websites that attempt to access objects that have been freed might be prevented from such access in Internet Explorer 8.
The performance improvements in Internet Explorer 8 affect every website loaded in the browser, regardless of the rendering mode. For more information, visit MSDN.
return to top