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:
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.
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.
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>
We love supporting the Webflow community, and your support means the world to us. If this helped you:
Thanks for being awesome. Keep building! 💪