I have a site which performs some data-fetching on load. I am trying make a preloader to this site that is only shown for however long it takes the site to fully load and complete any initial requests.
I've seen tutorials for preloaders where they just set a time interval on the loader, but I'm trying to make the loader actually wait for the page to load.
Any tips?