Description |
When script.js or any other script or css file is changed, then it's name stays the same and browser doesn't query it's new contents from server again. This could be a problem, especially, because user's need to clear browser cache before doing anything.
I propose to add new configuration variable named "ScriptVersion". It could be number or timestamp, doesn't really matter. We don't show it to user in admin (can change in db directly) and add to any script/css include in admin templates, like:
<script src="js/script.js?<inp2:m_GetConfig name="ScriptVersion"/>" .../>
<script src="inc/style.js?<inp2:m_GetConfig name="ScriptVersion"/>" .../>
When we change something in js/css then we change this variable value in db (and in upgrade script). This way when js/css is changed, then url also will be changed and browser will be forced to reread content from webserver.
|