I’ve noticed that the major part of my pages’ load time is the
Javascript for prototype and effects. Instead of forcing a reload per
request (by attaching the ?timestamp parameter), I’d like to force
reload this per release.
Right now, I load the CSS and JS manually (without the Rails helpers)
and just append a release number manually. It’s OK, but when I forget,
the CSS / JS don’t update.
Is there any way for the Layout template to access the release number?
Javascript for prototype and effects. Instead of forcing a reload per
request (by attaching the ?timestamp parameter), I’d like to force
reload this per release.
Actually it’s not a per-request reload The timestamp is not the current
time, but the timestamp of when the file was last updated. By doing
this, js, images, css… have the same signature (timestamp included) as
long as you don’t modify them, which is fine.
Your browser should detect the file name is the same and use the cached
version. No need for anything else.
I’ve noticed that the major part of my pages’ load time is the
Javascript for prototype and effects. Instead of forcing a reload per
request (by attaching the ?timestamp parameter), I’d like to force
reload this per release.
Right now, I load the CSS and JS manually (without the Rails helpers)
and just append a release number manually. It’s OK, but when I forget,
the CSS / JS don’t update.
Is there any way for the Layout template to access the release number?