문제

i am using Quake Slider in part of my website.this plugin is creating div(s) from images for making transition.the problem is when div(s) get created , background-image property of them changing according to current image src attribute, and causing the browser to reload image from the server (and strangely not from cache).can anyone give me the point how to change this plugin to not reload image when jquery css('background-image') get called?thanks for your concern.

도움이 되었습니까?

해결책

Expiration and caching response headers

Browsers reload content based on their last accessed expiration and caching headers sent from the web server. So if images expired in the past, browser will have to reload them regardless of whether they've just been loaded.

As you're using IIS I suggest you read this question that links to MS resource with description of configuration elements to control this behaviour.

When you configure your server to not expire static content you can still convince browser to reload some static content by adding a random value along with your request i.e.

http://somewhere.com/images/always-realod.jpg?a9s87h7sdf6
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top