WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > PROGRAMMING LANGUAGES > Scripting and Server Side > Cached Images loaded again in Lazyload

Reply
  Thread Tools Display Modes
Old 19th April 12, 07:40 PM   #1
cryoffalcon
WLC Lover
 
Join Date: Mar 2012
Posts: 53
Default Cached Images loaded again in Lazyload

Hi,
well I am using lazyload here http://bloghutsbeta.blogspot.com/201...ting-2_04.html
the lazyload is used as a combination with the quicksand jquery. And as quicksand requires a callback so a callback function for lazyload is also added to the quicksand (as if you click buttons like Bicycle, Motorcycle etc, then quicksand requires callback function) here is the callback function:

Code:
$("img").lazyload({
    		effect : "fadeIn"
    	});
    });
Now my problem is that even when all of the images are cached you click e-g on cricket button then it again loads the images, its kind of annoying for users as they load the images and when they click on buttons it loads images again and again as you click on buttons. So, I was thinking what could be solution to it?

*Please don't tell me to use other jquery instead of lazyload or quicksand as that is not an option for me*
cryoffalcon is offline   Reply With Quote
Old 19th April 12, 11:10 PM   #2
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: Cached Images loaded again in Lazyload

Actually I'd tell you not to use any of them.
chrishirst is offline   Reply With Quote
Old 20th April 12, 07:46 AM   #3
cryoffalcon
WLC Lover
 
Join Date: Mar 2012
Posts: 53
Default Re: Cached Images loaded again in Lazyload

Quote:
Originally Posted by chrishirst View Post
Actually I'd tell you not to use any of them.
Okay I would listen to your advice, can you atleast tell me why?
cryoffalcon is offline   Reply With Quote
Old 20th April 12, 12:33 PM   #4
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: Cached Images loaded again in Lazyload

Because the image loading has been handled in the browser context by javascript, the browser image handler may not "know" about them in the cache.

Instantiated javascript objects are (or should be) destroyed after use to prevent the "heap" from using memory that has been released and dragging down the browser, once they are destroyed, anything that was referenced by the object is also lost, so the images and their "local" location is lost to the browser context.
chrishirst is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:34 PM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyright© 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.