In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
40 [In-Portal CMS] Admin Interfaces bug report always 2009-06-03 04:41 2011-12-02 04:56
alex  
Dmitry  
normal  
closed 5.1.0  
no change required  
 
none 5.1.0  
http://groups.google.com/group/in-portal-dev/browse_thread/thread/d81f3bf4d0f0bd38#
0
0000040: Issues with JavaScript and CSS Caching
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.
duplicate of 0000457closed  (5.1.0)!COMMUNITY Automatic CSS / JS Compression 
related to 0001167closed  (5.2.0)alex Improvements in Compressed CSS/JS File Naming 
Issue History
2011-12-02 04:56 alex Relationship replaced duplicate of 0000457
2011-11-13 17:09 Dmitry Relationship added related to 0001167
2010-08-31 14:24 alex Resolution open => no change required
2010-08-31 14:24 alex Fixed in Version => 5.1.0
2010-08-31 14:24 alex Note Added: 0002759
2010-08-31 14:24 alex Status needs work => closed
2010-08-31 14:23 alex version => 5.1.0
2010-08-31 14:23 alex Relationship added related to 0000457
2009-11-12 10:26 alex Reference => http://groups.google.com/group/in-portal-dev/browse_thread/thread/d81f3bf4d0f0bd38#
2009-11-12 10:26 alex Status active => needs work
2009-10-03 07:54 administrator Status needs work => active
2009-06-07 12:37 Dmitry Target Version 5.1.0 => Icebox
2009-06-07 12:37 Dmitry Note Added: 0000031
2009-06-07 06:38 alex Reproducibility @70@ => always
2009-06-07 03:15 alex Note Added: 0000030
2009-06-07 03:15 alex Assigned To alex => Dmitry
2009-06-07 03:15 alex Status needs feedback => needs work
2009-06-06 23:10 Dmitry Target Version => 5.1.0
2009-06-06 23:07 Dmitry Assigned To => alex
2009-06-06 23:07 Dmitry Status active => needs feedback
2009-06-06 23:06 Dmitry Note Added: 0000027
2009-06-06 23:04 Dmitry Summary Script and css caching issues => Issues with JavaScript and CSS Caching
2009-06-03 04:41 alex New Issue

Notes
(0000027)
Dmitry   
2009-06-06 23:06   
I believe timestamp makes more siense to use in this case.

By the way, do you know how is this solved in JQuery? I think they have some Caching reset mechanisms...
(0000030)
alex   
2009-06-07 03:15   
They have option to prevent ajax responses to be cached in Internet Explorer. It's not our case at all. We face problem, that updated javascript/css versions are not queried from server.
(0000031)
Dmitry   
2009-06-07 12:37   
Ok, let's put this in improvement in Future release and will decide on specific version shortly.
(0002759)
alex   
2010-08-31 14:24   
Closing, since already implemented in other way in related task.