How does Webflow determine when a "page finishes loading"?

Hi all —

Does anyone know how Webflow determines when a page is actually “finished loading”? I know it’s possible to set this via the Page Load animations in IX2.0, but I’m more interested in figuring out the mechanics behind it, as I want to fire off a small script at the same time.

Here’s my situation: I have a preloader that begins once the page is finished loading, and I have typed.js that is - in theory - started when the page is done loading. I’m using JQuery’s document.ready() to fire off the script, but I’ve noticed that this doesn’t always line up with when Webflow determines the page has finished loading. Is it possible to trigger a script to fire off at the same time that WF determines the page is done loading?

Hopefully this makes sense, but I’m happy to clarify otherwise.

My read-only link can be found here. Thank you in advance for taking a look!

EDIT: One quick side-note — there is an intentional delay in my typed.js script, but I can confirm that this is not the issue.

Take a look at this topic.

1 Like

Beautiful — I think that’s exactly what I needed to know. Thank you, Jeff!

1 Like

I need to test this with cart events in e-commerce. :slight_smile:

1 Like

I know it’s an old thread, but did you figure it out, @mattvaru?

I wanted to create a percentage based pre-loader that shows an actual website loading progress.

I understand it might not be possible, so I come up with an idea: just count the progress artificially for a certain amount of time (from 0% to 45% in 10 second, let’s say) and then just bump it up all the way to 100% when the page is loaded, but it should still count the numbers, not to show 100% immediately — just really fast.

Will appreciate any help!