[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

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 later
Netscape 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: Consider a document whose web settings part contains the following WordprocessingML:

<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. end example]

Parent Elements

webSettings2.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.

 

[Example: For example, consider the following on/off property:

 

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

 

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

 

The possible values for this attribute are defined by the ST_OnOff simple type2.18.67).

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

<complexType name="CT_OnOff">

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

</complexType>