help - "loading" page before main page shows

Status
This thread has been locked.
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Tom Croft

Tom Croft - Web Developer
Premium
Feedback score
5
Posts
103
Reactions
64
Resources
0
Essentially you're going to want a fixed div that's full height and width with an image or gif in the center. In JS we can just say on page load, wait 2 seconds then remove the element / give it a class which will fade it out.

If you're not very technically inclined, there are JS libraries such as Fakeloader which is perfect for this and even comes with a few free loaders.
 

sentosa

entitled to the throne
Premium
Feedback score
7
Posts
136
Reactions
70
Resources
0
Paid or Unpaid?

Essentially you're going to want a fixed div that's full height and width with an image or gif in the center. In JS we can just say on page load, wait 2 seconds then remove the element / give it a class which will fade it out.

If you're not very technically inclined, there are JS libraries such as Fakeloader which is perfect for this and even comes with a few free loaders.

I just used basic HTML and CSS and keyframes to fade out the full width/height div. In other words, I solved the problem :)
 

Xenons

Web Designer & Developer
Premium
Feedback score
3
Posts
305
Reactions
151
Resources
0
I just used basic HTML and CSS and keyframes to fade out the full width/height div. In other words, I solved the problem :)
In theory yes that works but using js to execute it on page load actually works as proper loader as well
if a page is small you can always just add a delay before the div is faded out or such.
 

sentosa

entitled to the throne
Premium
Feedback score
7
Posts
136
Reactions
70
Resources
0
In theory yes that works but using js to execute it on page load actually works as proper loader as well
if a page is small you can always just add a delay before the div is faded out or such.
It's not so much of a loader as it is a part of the website that always executes, even on an instant page load.
 

Sullybash12

Get Your Python Programs and Discord Bots!
Premium
Feedback score
31
Posts
1,198
Reactions
522
Resources
0
That page isn't necessarily loading during that transition, it is just showing you something, appearing to load.
 

Xenons

Web Designer & Developer
Premium
Feedback score
3
Posts
305
Reactions
151
Resources
0
It's not so much of a loader as it is a part of the website that always executes, even on an instant page load.
yeah but I said it as a bonus, for example if someone has a really old pc and actually requires a while to load, it will wait till the site loads for the user
and you can add a delay as I mentioned to make it always at least x amount of seconds long before it goes away
 

sentosa

entitled to the throne
Premium
Feedback score
7
Posts
136
Reactions
70
Resources
0
That page isn't necessarily loading during that transition, it is just showing you something, appearing to load.
Yes that's... that's the whole point...
 

Sullybash12

Get Your Python Programs and Discord Bots!
Premium
Feedback score
31
Posts
1,198
Reactions
522
Resources
0
Just have a new div and have javascript sleep for 2 seconds before transitioning to a new page...
 
Status
This thread has been locked.
Top