On this page
Navigation reference
Navigate between pages and customize navigation feedback.
Method signatures
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Before you begin: Dialogs reference.
Navigation
Frontbacked.reload() refreshes the current page. Both navigation APIs work on storefront and theme management pages.
Frontbacked.navigate(url, options?) loads a same-site page without a full browser refresh. It swaps in the next page, re-runs FQL for that page, and keeps browser history in sync.
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Navigation options:
| Option | Purpose |
|---|---|
history | "push" by default. Use "replace" to replace the current history entry or "none" for popstate handling. |
scroll | "top" by default, including when navigating to another page with a hash. Use "preserve" to keep the current scroll position. |
minLoadTime | Minimum loading time in milliseconds before the loaded page is shown. Useful when a design should keep its loader visible briefly. |
fallback | Reloads the browser on navigation errors by default. Set false if you want to handle failures yourself. |
Frontbacked shows a small progress bar at the top of the page as soon as navigation starts. It gives visitors immediate feedback while the next page is prepared and respects reduced-motion preferences.
Match the built-in indicator to your theme either during initialization or later from your theme JavaScript:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Set navigationIndicator: false or call Frontbacked.navigationIndicator(false) when your design should not show an indicator.
For a fully custom loading experience, add f-loader to its root element. Frontbacked automatically shows that element during navigation and does not add its built-in progress bar:
Opt a link or page out of SPA navigation when you need a hard reload:
To inspect a custom loader during development, add a minimum load time:
Frontbacked also prefetches same-site pages on link hover, focus, and touch start. It fetches the HTML with normal browser cache rules, reads the next page's stylesheets, and preloads missing CSS before the actual navigation. A click reuses an in-progress hover request, and recently prefetched page source can be reused for 30 seconds. Page data still loads for the current visit. Prefetching is limited and respects data-saving connections. During navigation, the old page stays visible until the destination stylesheets and page shell are ready, which prevents a flash of unstyled content.
Continue with Skins and support reference.