How to display preloader only once?

Hi, i’ve implemented a preloader (home page only) which works fine, but I would like it to be displayed only once a session, i.e. if the user goes from home page to another page and returns to home page, the preloader will not be displayed again.
The preloader is set for mobile only.

I’ve tried to implement @samliew solution: Cookie Consent - Modal wrapper but just on the first load possible?, but unfortunately it’s not working for me, and I also get many errors in the console.

Can anyone help me with this?

This is my preview link:

and this is the live website:

Thank you,

1 Like

Hey @Naama

@Finsweet Has a cool video with a trick you can try. See here > #10 - Use Webflow Interactions to play animation once per day - YouTube

Piter :webflow_heart:


Thank you so much @PeterDimitrov and off course @Finsweet for solving this issue!!!


Great video. Thanks!


I see it working! Looks great. Thank you for subscribing :slight_smile:


@Finsweet and @PeterDimitrov, another question please - after the pre-loader finishes, a slider starts playing, but I don’t know how to delay the first slide, it’s displayed briefly and moves to the second slide.
Do you have any idea?

Thank you,

@Naama This would be a really nice F’in sweet Webflow Hack.

We built something somewhat similar with Webflow tabs component for Streak. Features | Streak - CRM for Gmail. The tabs turn into an autoplay slider and only start their autoplay when the user scrolls to to that tab component. The same mentality can go into the “Delay slider”

I’m going to add this to our Hacks queue. I’m guessing you’ll want the slider to begin when the user scrolls to the slider? Anything else I should add in the specs?


Hi @Finsweet, thank you so much for this! I wish the slider to begin when the slider comes back to focus, since the slider is autoplaying, no need for the user to scroll it.

important to other users. @Finsweet code solution could solve any issue related to “Show only once” (Show modal/popup only once. Show terms only once. Do X only once and so on…).


Basic use:


Cookies.set('name', 'value');
/*Create an expiring cookie, valid to the path of the current page:
Cookies.set('name', 'value', { expires: 7, path: '' });


Cookies.get('name'); // => 'value'
Cookies.get('nothing'); // => undefined

Show cookies under Chrome inspector:

right clickinspect (Or ctr+shift+I) → Application Tab

Cockies Basic guide

1 Like

Hi @Finsweet sorry for bothering you with this, perhaps you can help me:
the page wrapper contains a slider in the hero section. On the first time the pre-loader is working and then the page wrapper is displayed, only the the first slide is displayed. When refreshing, whole the slider is displayed.

this is the preview link:

and the live website:

I would really appreciate your help.
Thank you,

Hey @Naama , been trying to do the same thing on my page, but can’t seem to get it to work, mind taking a look? Thx!

Hi @zellet, 2 things I see:

  1. preloader - should be displayed: flex and not hidden
  2. the interaction should play when page loads, not when finished loading

does it help?


It was hidden so i could continue working on the site. The issue I’m having is the cookie thing, it wants to load when anything on the page needs to load. See here:

Hey @zellet, sorry but I don’t undesrstand the problem. This is what I get when entering the URL you sent:

Hey @Naama, just saw this. This is weird behavior. I took a look and I’m not sure why this is happening.

Is there a reason there is an ix1 legacy interaction called “New Interaction” on the the slider element?

Cool preloader by the way

Hi @Finsweet, i’ve removed the ix1 interaction now, it was something left from my testings.
I actually solved the problem by adding a page refresh after the pre-loader is done. It’s not elegant, but solved the problem. You can see it here:

Thank you,

1 Like

Hi @Finsweet … Thanks for the hack! I desperately needed a solution but however… in spite of trying and tweaking your code for many hours I am unable to make it work.

Linking onto @zellet issue i.e unable to create or retrieve cookies. Any advice on where I am going wrong?

NOTE: I deleted the script since it was not relevant to mine but I dont think that is the problem; anyways awaiting help from experts (:thinking:)

Some additional info:

  • I published and reviewed my site across many devices

  • I cleared any webflow or my domain related cookies/cache before I published with the script.

script works amazing, but can’t find the solution to achieve this…

on Initial page visit/load

loader-animation starts [contains elements from loader-wrapper]
loader-animation stops
page-animation starts [loading background, menu’s = elements from page-wrapper]

on second load / refresh

directly starts page-animation [loading background, menu’s and content from page-wrapper]

been struggling for hours trying all sorts of combinations, multiple page load animations, scroll into view triggers, removing the timer part, etc etc… but no luck so far. Either the initial load skips the page-animation, or the second load has a white delay before the page-animation…

any Ideas?

I’m using this trick and it breaks my home page inside the Webflow Editor any ideas @Finsweet ?