SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Can Javascript (AJAX) Help Me.

    I have developed a website which has a store page. The store page uses Spry SlideShow widget to move between products.

    When I started this project there weren't so many products. However, not that there are lots of products the page is loading slowly because of all of the images loading up.

    Is there some kind of AJAX ImageLoader Class which will do this once the page has loaded. So the user can start browsing around whilst the images happily display a nice loader gif.

    Oh, and just to make things even more messy, the images are all loaded dynamically inside a PHP for loop that build each of the SlideShow panels.

    Any help would be most welcome.

  2. #2
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi , as per requirements , if images are of less sizes then it should not take time to load.. i mean try to re size that image with gd library which is there in php.

  3. #3
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's not an option I am afraid. The images need to be of a reasonable quality. 55K per image of which there are around 125.

  4. #4
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have u tried any jquery Image gallery plugin? I think images of 55k should not take time to slide in jquery plugin.

  5. #5
    SitePoint Member
    Join Date
    Sep 2006
    Location
    Columbia, MO
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Random idea: wait until page's elements are done loading/initializing, then load all images into an invisible iframe, which will pre-fill the browser's cache. (This may pollute the browser history, though. Anyone know for sure?)

    I'm pretty sure the same thing could be done using an XHR request(s) - weighing bandwidth against performance, obviously.

    To do this you may need to code a script whose only function is to crank out a page with all of the images you want preloaded. Personally, though, I'd make it smart enough to only preload the images that would for-sure be needed.
    Garvin

    Smooth Operator
    Snappy Dresser


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
  •