Back

How to return to your last visited page in Webflow

Want to let your user return to the page they just left? This guide is perfect for you.

June 18, 2025
15
Min Read
Tom B
Founder
@flowbase

How to Return to the Last Visited Page in Webflow

Want to let users go back to the page they just came from? Whether you're building breadcrumbs, modals, or "back" links, this lightweight solution gives you full control — without needing a CMS or complex logic.

Perfect for use cases like:

  • Multi-step forms
  • Documentation or help centers
  • Modals or overlays with exit links
  • E-commerce product flows

🛠 How It Works

We’re using a simple window.history.back() function that takes the user to the last page they visited — just like the browser’s back button.

Example of return back link in action.


1. Create link with class name .return

Add a Link Block or Text Link to your page and give it the class:

.return

This tells the script which element should trigger the back navigation.

2. Add custom code

You can add this code in either in your page or site settings. We recommend putting this in page settings, if we plan to use this in multiple places.

<script>
  $(document).ready(function() {
    $(".return").click(function() {
      window.history.back();
    });
  });
</script>

Putting code in project settings footer
Putting code before the pages body tag.

Did you find this helpful? 💕

We love supporting the Webflow community, and your support means the world to us. If this helped you:

Thanks for being awesome. Keep building! 💪

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Pro
Upgrade to Flowbase Pro

Discover unlimited inspiration to help you build better, faster.

All Access
Join Pro
3500+ components
Build better, faster
Illustrations & Icons
Designers side-kick
Instant copy & paste
Paste to your platform