SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML5 Preloader?

    Is there a way I can load a whole website or specify what I want loaded while my website displays a loading bar?

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    4 Thread(s)
    no, at least not a true one.
    The only code I hate more than my own is everyone else's.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,549
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    It's' a little complicated but you could hide the content while the page is loading and perhaps show a loading gif and then remove it once the page has completed loading. You should be able to find an example here.

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    4 Thread(s)
    That isn't a true loader though. A true loader would be able to detect the amount of the page that has loaded.
    The only code I hate more than my own is everyone else's.

  5. #5
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    You could potentially use something like PHP which calculates the total amount of data that's going to be sent and then reports that to the page while it starts loading... however, the amount of time it'd take to parse the HTML and CSS and calculate all those sizes would be a bit overkill.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,549
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by oddz View Post
    That isn't a true loader though. A true loader would be able to detect the amount of the page that has loaded.
    Yes true


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •