Navigation: canGoForward property
Baseline 2026Newly available
Since January 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
ThecanGoForward read-only property of theNavigation interface returnstrue if it is possible to navigate forwards in the navigation history(i.e., thecurrentEntry is not the last one in the history entry list),andfalse if it is not.
In this article
Value
A boolean value:true if it is possible to navigate forwards in the navigation history,false otherwise.
Examples
js
async function backHandler() { if (navigation.canGoBack) { await navigation.back().finished; // Handle any required clean-up after // navigation has finished } else { displayBanner("You are on the first page"); }}async function forwardHandler() { if (navigation.canGoForward) { await navigation.forward().finished; // Handle any required clean-up after // navigation has finished } else { displayBanner("You are on the last page"); }}Specifications
| Specification |
|---|
| HTML> # dom-navigation-cangoforward-dev> |