ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Preload Images

December 28, 2009 8:01pm

Subscribe [3]
  • #1 / Dec 28, 2009 8:01pm

    Neo Mudaly

    90 posts

    Hi,

    I’m using a jquery gallery to display some images as part of my portfolio.

    I’ve set the template to cache but on the initial view the images are a little sticky when I view next or previous image. They continue to be sticky (slight delay simulating loading) on the page until I go to another page and then return.

    On return they’re smooth. Is there a way for me to force the caching of images in a particular template on initial load?

    Many thanks,
    Neo

  • #2 / Dec 28, 2009 9:25pm

    I’m not entirely sure about the caching itself but here is a way to preload images in the background using jQuery. If your gallery is a slideshow type of presentation maybe that will be enough to get the stickieness out of it:

    http://jquery-howto.blogspot.com/2009/02/preload-images-with-jquery.html

    I hope this helps.
    Good luck,
    Jannis

  • #3 / Dec 28, 2009 10:13pm

    Neo Mudaly

    90 posts

    Thanks Jannis,

    It doesn’t seem to be a problem getting the images to initially load - I’ve tried a couple of preloading scripts now as well as coding the images directly onto XHTML and then using CSS to hide them.

    For some reason the images don’t go into the cache after they’ve been loaded initially. Only if I navigate to another page and return, does the gallery behave like the images have been cached.

    I might be missing some sort of EE cache setting that’s preventing caching on the template…

  • #4 / Dec 28, 2009 11:31pm

    Hmm.. I’m afraid I am still pretty new to EE so I can’t help with any of the caching stuff yet.
    Maybe someone else will jump in and share some knowledge.

    One last thing I can recommend it this series of screencasts:
    http://www.pragprog.com/screencasts/v-riexp/building-a-dynamic-website-with-expressionengine

    Especially Episode #11 is focusing entirely on EE caching, I have watched a couple of those and they’re very good.

    J.

  • #5 / Dec 29, 2009 12:29am

    Neo Mudaly

    90 posts

    Thanks J,

    I’ve had a look but am no closer to an answer. Still confused as to why I can’t get the images into the cache on initial load and why I need a page refresh in order to get ‘em there…

    As this is a portfolio gallery it’s kinda important for me to have this load smoothly first time out. Does anyone have any other ideas/suggestions?

    Neo

  • #6 / Jan 06, 2010 7:47pm

    Neo Mudaly

    90 posts

    Hi guys,

    Still not able to find a solution…

    Have I missed something? I’m loading the images directly onto the page now and using a div display:none to hide them so that there’s no doubt they’re being loaded first up. They still don’t appear to be in the EE cache until the page is refreshed.

    Any help/explanation would be greatly appreciated.

    Neo

  • #7 / Feb 02, 2010 7:33pm

    Neo Mudaly

    90 posts

    I guess no one has a clue what I’m talking about… do I need to clarify or is this something I need to live with? Anyone experience anything similar…

    anyone… ❓

  • #8 / Mar 10, 2010 2:33pm

    JenSkim

    197 posts

    I am trying to deal with nearly the exact problem. My site: http://www.utexas.edu/cie/stories - where I’m using jquery with entry tags to display images and story. As the days add up, the image loading gets slower and slower… so I’m looking for a solution to this as well. I’m going to try the jquery preloader information posted in this thread. Will let you know what happens.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases