Share via


InPrivateFilteringEnabled method

Detects whether the user has enabled InPrivate Filtering.

 

Syntax

HRESULT retVal = object.InPrivateFilteringEnabled(pfEnabled);

Parameters

  • pfEnabled [out, retval]
    Type: VARIANT_BOOL

    Returns VARIANT_TRUE if the user has enabled InPrivate Filtering; VARIANT_FALSE otherwise.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Examples

The following example detects whether InPrivate Filtering is enabled. Publishers and Web sites can use this approach to customize their experience for customers who browse with InPrivate Filtering.

<script type="text/javascript">
if (window.external.InPrivateFilteringEnabled() == true)
{
    document.write("The user has InPrivate Filtering enabled.");
}
else
{
    document.write("The user has InPrivate Filtering disabled.");
}
</script> 

See also

window

external

IEIsInPrivateBrowsing