SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 30
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Location
    San Diego
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Page Loading Gimmick

    A client wants a white page until the full HTML page loads. Is there any situation where the following code doesn't degrade gracefully?

    Maybe try www.kylemaxwell.com/test.html for an example of this code in use. See if you can break it. It's a large text file.

    Code:
    <body style="display:none" onload="document.body.style.display='block'">[

  2. #2
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,294
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    It works OK, but personally, it sits at a white screen that long, I'm outta there. Makes me think the site is slower than it actually is.
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style
    Learn how to be ready for The Forums' Move to Discourse

  3. #3
    SitePoint Addict prairieweb's Avatar
    Join Date
    May 2003
    Location
    Kansas
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I totally agree
    My Websites 1 2

  4. #4
    SitePoint Zealot ComputerBob's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think your client is crazy to WANT it to work that way.

    Using my dial-up account, I clicked on the link you gave.

    After waiting 2 entire minutes, the download indicator indicated that the page WASN'T EVEN HALF-LOADED.

    If I hadn't been testing it for you, I would've been gone after the first 7 seconds of nothing but white screen.
    ComputerBob - Making Geek-Speak Chic™
    http://www.computerbob.com
    - XHTML 1.0 Strict + CSS Layout
    Ratings | Forums | Software | Polls | Weird | Quotes | Weather
    Guest Articles | Free Greeting Cards | CB Awards | Search

  5. #5
    SitePoint Wizard Keriam's Avatar
    Join Date
    Jun 2003
    Location
    Colorado, USA
    Posts
    1,178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I tried it, I got a the loading page message, flickering like it was doing something, and the page just stayed white after saying done. I for sure would never go back there

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Inform your client that he is an idiot and will probably have the least visited website on the Internet. Printing this thread ought to do the trick.

  7. #7
    SitePoint Addict CeleronXL's Avatar
    Join Date
    Dec 2002
    Location
    United States of America
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I would do, if I had to, would be to pop everything into a <div> that first displays as 'none' and then goes back to 'block' after it's loading, instead of <body>. And before this <div> have another <div> that contains a loading message. Then when the page is finished loading, set that display to 'none'.
    So hold me when I'm here
    Right me when I'm wrong
    Hold me when I'm scared
    Love me when I'm gone.

  8. #8
    SitePoint Addict
    Join Date
    Mar 2003
    Location
    CA
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Worst request by a client...ever.
    -ChaCha

  9. #9
    SitePoint Zealot Optimum's Avatar
    Join Date
    Apr 2003
    Location
    Miramar
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A better option would be for the page to load sequentially so at least the viewer has something to look at until the full page loads. In some cases the link they want will load before other areas of the site and they can click on it right away.

  10. #10
    The knight who said ni! RockyShark's Avatar
    Join Date
    Apr 2003
    Location
    Rockhampton, Australia
    Posts
    699
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Clients ask for stupid thing sometimes, don't they! It just looks like nothing is happening - bad idea. No-one will wait for it. Talk your client out of the idea at all costs!!!

  11. #11
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I read the whole tread and still it didn't load.... bad idea...

    Rik
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac

  12. #12
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still waiting...
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac

  13. #13
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yaaaaaaawwwwwwn

    zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac

  14. #14
    SitePoint Enthusiast hutchysk8er's Avatar
    Join Date
    Apr 2003
    Location
    Scotland
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    def not a good idea, i usually give up after 5min at most (i leave things workin, always doin 3 things at once), will take agggeeees on dial up, but im gettin 10k a sec so............
    Anyway, def a bad idea, need a loading animation or sumfin.
    Hutchy

  15. #15
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by hutchysk8er
    Anyway, def a bad idea, need a loading animation or sumfin.
    That's quality grammer!

    As everyone says, get a loading message. The multiple DIVs are a good idea, that way you can display a simple loading message while the rest of the page loads

  16. #16
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You all do realize that his test is a 2.5 MB file, right? That's going to take a few minutes on dial up. I would have to imagine that the actual page is going to be much smaller.

    Assuming a reasonable page file size, that white screen would be gone in less than a second with broadband and in a few seconds with dial up.

    It's a test. He's created a dramatic example so that we can tell him if his method works effectively in all our browsers. If he had made it a 30 KB file, I likely wouldn't have had a chance to really see the white screen before the page load on my connection.

    He did kind of warn us:
    Quote Originally Posted by kylemaxwell.com
    It's a large text file.
    Still, the loading bar is a decent suggestion... there is a user on SPF who used to be a real regular who had a good page loading script... I'll see if I can find it if there is demand or interest.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  17. #17
    SitePoint Enthusiast hutchysk8er's Avatar
    Join Date
    Apr 2003
    Location
    Scotland
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    id posted before it had all loaded, once it all loaded me comp totally died tryin 2 show it! but thats jst prob me comp....
    Hutchy

  18. #18
    SitePoint Member
    Join Date
    Oct 2003
    Location
    Ireland
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's quality grammer!

    And that's quality spelling!

  19. #19
    SitePoint Enthusiast hutchysk8er's Avatar
    Join Date
    Apr 2003
    Location
    Scotland
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i sense people not being nice to me. (perfect spelling!)
    Hutchy

  20. #20
    The knight who said ni! RockyShark's Avatar
    Join Date
    Apr 2003
    Location
    Rockhampton, Australia
    Posts
    699
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hutchysk8er
    i sense people not being nice to me. (perfect spelling!)
    But incorrect punctuation...

  21. #21
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by RockyShark
    But incorrect punctuation...
    Although widely accepted these days, you really shouldn't start a sentence with a conjunction

  22. #22
    The knight who said ni! RockyShark's Avatar
    Join Date
    Apr 2003
    Location
    Rockhampton, Australia
    Posts
    699
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I knew someone would pick me up on that!

  23. #23
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

  24. #24
    SitePoint Zealot ComputerBob's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DJ P@CkMaN
    Although widely accepted these days, you really shouldn't start a sentence with a conjunction
    You also shouldn't end a sentence without punctuation.
    ComputerBob - Making Geek-Speak Chic™
    http://www.computerbob.com
    - XHTML 1.0 Strict + CSS Layout
    Ratings | Forums | Software | Polls | Weird | Quotes | Weather
    Guest Articles | Free Greeting Cards | CB Awards | Search

  25. #25
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, that's the worst thing ever - try and convince your client otherwise. (page worked okay btw - didn't realise large meant 2.5mb though!)


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
  •