Static css and js files should user a version in the url to ensure that clients get the latest version
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Accomplishments Web Gallery |
Fix Released
|
High
|
Robin Gloster | ||
Ubuntu Community Web Themes |
In Progress
|
Undecided
|
Robin Gloster |
Bug Description
It is a problem that the pages load css files without a version in the url, for example:
{{ STATIC_URL }}css/style.css
If would be better to include a version id in the url that changes every time we commit an update to the file, for example:
{{ STATIC_URL }}css/style.
I don't know what is a good way to manage this. In the worst case we can manually increment the version number when making a change. Or a simple automated way could be getting the bzr revno somehow and passing it to the django template. Or we can use something more advanced like this django module:
http://
For the time being, I think it's ok to use hardcoded ?v=234 postfixes which we have to manually increment on every css change. Feel free to suggest a better way, especially something that you are using yourself in other projects.
Related branches
- ubuntu-accomplishments-web-editor-drivers: Pending requested
-
Diff: 76 lines (+15/-6)4 files modifiedREADME.md (+1/-1)
common/templates/base.html (+5/-5)
common/utils.py (+8/-0)
settings.py (+1/-0)
Changed in ubuntu-accomplishments-web: | |
milestone: | none → 0.4 |
Changed in ubuntu-accomplishments-web: | |
assignee: | nobody → Robin Gloster (robin-gloster) |
status: | Confirmed → Fix Committed |
Changed in ubuntu-community-webthemes: | |
assignee: | nobody → Robin Gloster (robin-gloster) |
status: | New → Fix Committed |
Nice nice, thanks Robin!