How to make slide show load faster?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Annalyzer
    New Member
    • Aug 2007
    • 122

    How to make slide show load faster?

    Is there any way to make this site load faster? I'm pre-loading the slide-show images into an array, the biggest one is 80KB and still it takes a few seconds before the first image becomes visible. Is there anything else I can do to speed things up?
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Well, I think that depends upon the downloading speed and has nothing to do with the HTML.
    But you can try one thing. Keep all the images (<img>) inside your HTML, inside a div with style="display: none;". See if it works.

    Comment

    • Annalyzer
      New Member
      • Aug 2007
      • 122

      #3
      Instead of pre-loading the images into an array?? Wouldn't that make it slower?

      Comment

      • hsriat
        Recognized Expert Top Contributor
        • Jan 2008
        • 1653

        #4
        When in an array, they are actually fetched from the server only when its their turn. But if you will add them inside the HTML with display:none, the images would get cached. And moreover the window.onload event would be fired after the images are cached.

        So on one hand you can say it will slow it down, since onload is being fired after all images are loaded. But on the other hand, it would improve the speed of the slide show as all the images would have been cached before being displayed.

        Comment

        • Annalyzer
          New Member
          • Aug 2007
          • 122

          #5
          I think I see what you're saying. I'll give it a try and let you know how it works. Thanks!!

          Comment

          Working...