AddToFavoritesBar method

Deprecated. Adds a URL to the Favorites Bar.

Internet Explorer 8



object.AddToFavoritesBar(URL, Title, Type)


URL [in]

Type: BSTR

The URL of the page to add.

Title [in]

Type: BSTR

The Title for this page.

Type [in, optional]


Variant of type String that specifies one of the following, or null.


The content is a RSS feed.


The content is a Web Slice.

Return value


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

Standards information

There are no standards that apply here.


As of Internet Explorer 10, this method is deprecated and should no longer be used. In addition, this method is not supported for Windows Store apps using JavaScript and will fail silently if called.

Caller must specify a non-null, non-empty URL and Title, and can optionally identify the URL as an RSS feed or a Web Slice. If the Type is a feed or slice, the function will subscribe using the Windows RSS Platform. When subscribing to a feed or a Web Slice, the Title is only used until the data can be retrieved from the server.

If no Type is specified, the item is simply added as a bookmark to the Favorites Bar.

Windows Internet Explorer 8 and later. For security reasons, the AddToFavoritesBar method must be called as a response to a user-initiated action, such a mouse click. If called from a different context, such as the onload event of the body element, the AddToFavoritesBar method fails silently.

See also

Subscribing to Content with Web Slices



© 2015 Microsoft