Enable browser caching of static assets
|
09-28-2011, 10:36 AM
Post: #6
|
|||
|
|||
RE: Enable browser caching of static assets
You don't make the users aware of it, it needs to be designed into the site itself. If you are expecting to change css or javascript files then you need to have a system in place where you can change the file name every time you change the contents.
Personally, I do this by having a version number declared in a global file and I bump the version number any time I edit the css or javascript. Anywhere they are included they are included as <file>?v=<version>. The query parameter is just ignored by the web server so the ACTUAL file name can be the same but it's enough to bust the cache. Purists may comment that the query string may prevent intermediate proxies from caching the content and that you should add the version to the URL itself but it wasn't worth the extra effort for my needs. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Enable browser caching of static assets - yzerfontein - 09-13-2010, 02:11 AM
RE: Enable browser caching of static assets - jabubo - 09-13-2010, 02:28 AM
RE: Enable browser caching of static assets - yzerfontein - 09-13-2010, 02:58 AM
RE: Enable browser caching of static assets - pmeenan - 09-13-2010, 12:30 PM
RE: Enable browser caching of static assets - microapp - 09-27-2011, 09:37 PM
RE: Enable browser caching of static assets - pmeenan - 09-28-2011 10:36 AM
|
User(s) browsing this thread: 1 Guest(s)