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.
Asked
Active
Viewed 309 times
2

Robert Koritnik
- 103,639
- 52
- 277
- 404

Behnam Esmaili
- 5,835
- 6
- 32
- 63
-
1What are expiration and caching headers sent from the server? Check response. – Robert Koritnik Jan 25 '13 at 10:02
-
`Expires Thu Jan 01 1970 03:30:00 GMT+0330 (Iran Standard Time)` – Behnam Esmaili Jan 25 '13 at 10:04
-
Exactly. All your images are sent with expiration in the past so they **must** be reloaded from the server. Try searching information how to configure your web server to send expired images. – Robert Koritnik Jan 25 '13 at 10:06
-
Which web server are you using? Apache? IIS? – Robert Koritnik Jan 25 '13 at 10:08
-
let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/23365/discussion-between-behnam-esmaili-and-robert-koritnik) – Behnam Esmaili Jan 25 '13 at 10:11
-
I've added an answer with a link that may be helpful. And due to security I'm unable to go to chat at the moment. Sorry about that. – Robert Koritnik Jan 25 '13 at 10:16
-
1thanks.you gave me the point. – Behnam Esmaili Jan 25 '13 at 10:19
1 Answers
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

Community
- 1
- 1

Robert Koritnik
- 103,639
- 52
- 277
- 404