Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 194 by Jim.mixtake: Css changes not updated on a live site
without refresh
http://code.google.com/p/django-hotclub/issues/detail?id=194
What steps will reproduce the problem?
1. Visit your site in a browser
2. Change the css file
3. Go to your site again (type it in again, don't hit refresh)
What is the expected output? What do you see instead?
You would expect the site to reflect your css changes, but it doesn't due
to browser caching. For some reason, browsers just assume the css file
won't change.
What version of the product are you using? On what operating system?
- doesn't matter
Please provide any additional information below.
The best way to fix this is to change your template to include the
svn-version as a GET argument where ever you have the code to add the css
file like so...
1. add {% load svn_app_version %} to your template
2. Change your link tag from
<link rel="stylesheet" href="{{ MEDIA_URL }}base.css" />
to
<link rel="stylesheet" href="{{ MEDIA_URL }}base.css?{% svn_app_version %}"
/>
In the default pinax project it had a static number as the get argument,
but I think that using the svn version is a better solution because it will
automatically change when you change the code of the site.
I guess in a perfect world you could use the svn version of the css file
itself, but this solution seems good enough to me :)
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---