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