To show a load animation only on a user’s first visit to the homepage in Webflow, you can use a simple cookie or localStorage
method with a bit of custom code.
#page-loader
) to the loader element.</body>
tag:<script> document.addEventListener("DOMContentLoaded", function() { if (localStorage.getItem("hasVisited")) { // User has visited - hide the loader instantly const loader = document.getElementById("page-loader"); if (loader) loader.style.display = "none"; } else { // First visit - run animation and set flag localStorage.setItem("hasVisited", "true"); } });</script>
To show a loader only on a user’s first visit in Webflow, create the loader with page load animation, then use localStorage
in custom code to detect first-time visitors. This works across sessions until the user clears storage.