IWebBrowser2::Offline Property

Sets or gets a value that indicates whether the object is operating in offline mode.


HRESULT IWebBrowser2::get_Offline(VARIANT_BOOL *pbOffline);
HRESULT IWebBrowser2::put_Offline(VARIANT_BOOL bOffline);


  • pbOffline
    Pointer to a variable of type VARIANT_BOOL that receives one of the values listed in Possible Values.
  • bOffline
    VARIANT_BOOL that specifies one of the values listed in Possible Values.

Possible Values

VARIANT_TRUE The control is offline.
VARIANT_FALSE Default. The control is connected.

Return Value

Returns S_OK if successful, or an error value otherwise.


In offline mode, the browser is forced to read HTML pages from the local cache instead of reading from the source document online.

The WebBrowser object delegates this method to the top-level frame. If no frame exists, it returns E_FAIL.