2

私は自分のウェブサイトの一部でQuakeSliderを使用しています。このプラグインは、トランジションを行うために画像から作成div(s)ています。問題は、div(s)作成時にbackground-image、現在の画像属性に応じて画像のプロパティが変更されsrc、ブラウザがサーバーから画像を再読み込みすることです(および奇妙なことにキャッシュからではありません)jquerycss('background-image')が呼び出されたときに画像をリロードしないようにこのプラグインを変更する方法を教えてもらえますか?

4

1 に答える 1

1

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
于 2013-01-25T10:16:00.640 に答える