mozilla
Your Search Results

    HTMLIFrameElement.purgeHistory()

    Non-standard
    This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

    This API is available on Firefox OS for privileged or certified applications only.

    Summary

    The purgeHistory method is used to clear the browsing history associated with the browser <iframe>. It doesn't delete cookies or anything like that; just the history data.

    Note: To delete cookies for a Firefox OS app, you could call clearBrowserData() on the actual app itself.

    Syntax

    instanceOfHTMLIframeElement.purgeHistory();

    Example

    var iframe = document.querySelector('iframe');
    var request = iframe.purgeHistory();
    
    request.onsuccess = function() {
      console.log('History deleted!');
    }
    
    request.onerror = function() {
      console.error(this.error.name);
    }
    

    Specification

    Not part of any specification.

    See also

    Document Tags and Contributors

    Contributors to this page: pablobm, Jeremie, chrisdavidmills, kscarfone, teoli, ajaybhat
    Last updated by: teoli,
    Hide Sidebar