php - nginx prevent loading from cache -


i updating site after finishing updates clients reporting old images & scripts getting loaded instead of new ones. know coming browser cache there way can force scripts not load cache in server.

i using nginx php-fpm.

you can force http headers influence browser caching behavior, not idea in production environment want caching.

so use like:

expires -1 

to force cache-control no-cache header

check here more information:

http://wiki.nginx.org/httpheadersmodule

that being said, have gotten myself in habit of changing image , static files names revise them. perhaps comes working cdn's can incredibly helpful. have static files might update (i.e. not part of specific piece of content). name them like:

someimagev1.jpg someimagev2.jpg somejs1.js somejs2.js etc. 

i change values (and links in html source) needed.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -