[fusion-users] ApplicationDefinition.xml and the browser cache
Paul Deschamps
pdeschamps at dmsolutions.ca
Tue Aug 19 09:50:42 EDT 2008
Essentially what we need to do is modify the headers like so
before we get the applicationDef. :
request.setRequestHeader('If-Modified-Since', 'Sat, 1 Jan 2000 00:00:00 GMT');
A workaround for now can be done easily in your applications
javascript, before you call Fusion.initialize
var options = {};
options.applicationDefinitionURL =
szApplicationRoot+'/ApplicationDefinition.xml?rand='+randomNumberHere;
Fusion.initialize(options);
Fusion.registerForEvent(Fusion.Event.FUSION_INITIALIZED, onInitialize);
This method can also be used if you have some php file that generates
your applicationDefinition.
options.applicationDefinitionURL =
szApplicationRoot+'/ApplicationDefinition.php'
Cheers
Paul D.
On Tue, Aug 19, 2008 at 8:45 AM, Paul Spencer <pspencer at dmsolutions.ca> wrote:
> Stuart,
>
> I think some browsers or web servers complain if you add query string
> parameters to a GET request for static content.
>
> There is supposed to be a way to modify the request headers on the client
> side to avoid caching, I'm pretty sure that hasn't been done in the fusion
> code yet.
>
> Obviously for production use, you want caching enabled so typically for
> development/debugging we use the web development extension for FireFox which
> provides an option to disable the cache and a shortcut to clear the cache.
> For IE, there is a similar developer toolbar which allows you to clear the
> cache quickly, and another thing called IE Tester which allows you to run
> different versions of IE in tabs that has a Refresh Complete (no cache)
> option.
>
> Cheers
>
> Paul
>
> On 19-Aug-08, at 4:27 AM, gingerbbm wrote:
>
>>
>> Any tips on definitively emptying the browser cache between edits of
>> ApplicationDefinition.xml? Both Firefox and IE resiliently hold on to old
>> versions and it's very irritating. Does anyone have a solution?
>>
>> I tried the following change in fusion.js but although initially the
>> results
>> were promising it appears to breaking something else (which I've not yet
>> had
>> time to investigate):
>>
>> this.applicationDefinitionURL = 'ApplicationDefinition.xml?rand=' +
>> parseInt(Math.random()*99999999);
>>
>> Thanks
>> Stuart
>> --
>> View this message in context:
>> http://www.nabble.com/ApplicationDefinition.xml-and-the-browser-cache-tp19046219p19046219.html
>> Sent from the Fusion Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> fusion-users mailing list
>> fusion-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>
> __________________________________________
>
> Paul Spencer
> Chief Technology Officer
> DM Solutions Group Inc
> http://www.dmsolutions.ca/
>
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
More information about the fusion-users
mailing list