[OpenLayers-Users] How to force the latest javascript script intoan openlayers application?

Charles Galpin cgalpin at lhsw.com
Wed Dec 7 08:35:09 EST 2011


On Dec 7, 2011, at 8:29 AM, Puneet Kishor wrote:

>> e.g. <script type="text/javascript" src="app.js?1"></script> and when I change something just change ?1 to ?2. But this still deosnt´ensure that the newest script will be loaded.
>>  
> 
> 
> Sure it will. What makes you say it won't? Adding a different query string makes it a different URI, so the browser will fetch the entire thing again instead of using its cache.

To be clear you want the number to be unique as it may be in the cache as well.  Use a date/time stamp like 2011120070834 to be sure.

hth
charles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111207/0edb8118/attachment.html


More information about the Users mailing list