0

I'm working on a web project and I want to load my webpages with an even transition. What I get right now is my photos and background downloading in a curtain-like manner. I want it to show up when it is all loaded instantly.

I don't mind if there is a progress bar or something but not the curtain-like manner.

I used the prefetch/prerender html 5 tag but with no success.. visit here : http://hellenic-jewls.com/ and then try to hover to another webpage to see that my images are downloaded progressively like a curtain : e.g. http://hellenic-jewls.com/classical/ ofcourse when the webpages are cached it's ok.

Sam One
  • 19
  • 3

1 Answers1

0

HTML5 prerender/prefetch doesn't work that way. You use them to hint to the browser that you think that page will be visited next and should therefore be prerendered. There is no guarantee that this will happen though... it's up to the browser to decide if it wants to prerender the page.

Further, there will only be one page prerendered at any one time.

What you can do is hide your images, then use a script like https://github.com/desandro/imagesloaded to signal when the images are loaded, at which point you can show the images (with a fade-in transition if desired)

Mark Simpson
  • 2,344
  • 2
  • 23
  • 31