<optimizeForBrowser> (Disable Features Not Supported by Target Web Browser)

This element specifies whether applications should attempt to detect the target web browser for any web page produced from this document, and subsequently disable all user interface and output which is not supported by that target web browser.

The target web browser can be determined by the state of the following elements:

  • <allowPNG>

  • <doNotRelyOnCSS>

  • <relyOnVML>

  • <doNotSaveWebPagesAsSingleFile>

The following table determines how this determination is made:

Settings

Target Browser

<allowPNG> is off<doNotRelyOnCSS> is on

<relyOnVML> is off

<doNotSaveWebPagesAsSingleFile> is on

Microsoft Internet Explorer 3.0 or laterNetscape Navigator 3.0 or later

<allowPNG> is off<doNotRelyOnCSS> is off

<relyOnVML> is off

<doNotSaveWebPagesAsSingleFile> is on

Netscape Navigator 4.0 or later

<allowPNG> is off<doNotRelyOnCSS> is off

<relyOnVML> is off

<doNotSaveWebPagesAsSingleFile> is off

Microsoft Internet Explorer 4.0 or later

<allowPNG> is off<doNotRelyOnCSS> is off

<relyOnVML> is on

<doNotSaveWebPagesAsSingleFile> is off

Microsoft Internet Explorer 5.0 or later

<allowPNG> is on<doNotRelyOnCSS> is off

<relyOnVML> is on

<doNotSaveWebPagesAsSingleFile> is off

Microsoft Internet Explorer 6.0 or later

If this element is omitted, then no user interface or output which is not supported by that target web browser shall be disabled.

example:
<w:webSettings><w:optimizeForBrowser />
	<w:allowPNG w:val="on"/>
	<w:relyOnVML w:val="on"/>
</w:webSettings>

The <optimizeForBrowser> element specifies that all settings which are not compatible with the target web browser shall be disabled. Since the settings of the four element described above match a target browser of Microsoft Internet Explorer 6.0, features not supported by Microsoft Internet Explorer 6.0 shall be disabled. ]

Parent Elements

<webSettings>2.15.2.44)

Attributes

Description

<val> (On/Off Value)

Specifies a binary value for the property defined by the parent XML element.

A value of on, 1, or true specifies that the property shall be explicitly applied. This is the default value for this attribute, and is implied when the parent element is present, but this attribute is omitted.

A value of off, 0, or false specifies that the property shall be explicitly turned off.

<w:… w:val="off"/>

The @val attribute explicitly declares that the property is turned off. ]

The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_OnOff">
	<attribute name="val" type="ST_OnOff"/>
</complexType>