Changed static files stay cached in browser and won't be reloaded automatically
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Errors |
Triaged
|
Medium
|
Unassigned |
Bug Description
FIX FOR CHANGED STATIC FILES
Symptom:
After deploying new static files like css,js,img the files sill stay cached inside the browser. The browser has no way to know that the files have changed.
Fix:
the filename of the static files must include the timestamp of last modification. The presented fix below would take care of it.
The changes were done under the instructions of:
http://
FIXING INSTRUCTIONS
1) Additional Django app which must be installed:
django-static (install command => easy_install django-static)
2) In case of using Nginx, the following lines must be added (if using Apache, tell me I'll find out what to do):
location ^~ /cache-forever/ {
root /tmp;
expires max;
access_log off;
}
3) Apply Patch
file: errors-
Kind Regards,
Adrian Wechner
Thanks for this patch! For your information we are using apache as our web server for the errors site.