Return to articles
Return to last visited page in Webflow
Tutorials

Return to last visited page in Webflow

Learn how to add a simple return JS script for your breadcrumbs

Flowbase
January 5, 2019

This one is super simple and a perfect way to return your users to their previous page.

We believe this one is best suited for breadcrumbs, when you want to have a return link that actually returns users to the last page.

Example of return back link in action.


1. Create link with class name .return

Firstly you will want to add a link block or text link and give it the class name (.return). This is what will communicate with the script below.

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.
ABOUT THE AUTHOR
Flowbase

Flowbase is the leading company for Webflow resources. We provide customers a collection of premium and free resources that help them build better products with Webflow.

Enjoyed this read?

Stay up to date with the latest video business news, strategies, and insights sent straight to your inbox!

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

Recieve webflow resources directly to your mailbox.

Sign up to get weekly insights & inspiration in your inbox.

OTHER GUIDES & LESSONS

Boost your webflow site further.