MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See for all notifications.

Your Search Results


    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.


    The getCanGoBack method is used to know if it's possible to go back in the navigation history of the browser <iframe>.


    var instanceOfDOMRequest = instanceOfHTMLIframeElement.getCanGoBack();


    Returns a DOMRequest object to handle the request's success or error. If the request is successful, the request's result will be a boolean indicating if the history can be navigated backward (true) or not (false).


    var browser = document.querySelector("iframe[mozbrowser]");
    var request = browser.getCanGoBack();
    request.onsuccess = function () {
      if (this.result) {
        console.log("It's possible to navigate the history backward.");
      } else {
        console.log("It's not possible to navigate the history backward.");


    Not part of any specification.

    See also

    Document Tags and Contributors

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