[Cosmo-dev] QA'ers - Clear your Cache!

Aparna Kadakia aparna at osafoundation.org
Thu Jul 26 17:49:46 PDT 2007


Even as we say people testing against cosmo should clear their cache,  
how frequently should they have to do that? I cleared my cache  
yesterday morning and I have been using the app from the same  
instance of browser.  Cosmo instances get refreshed couple of times a  
day, does it mean each time the cache has to be cleared?

I feel leaving the onus on testers to clear their cache is a bit too  
much, people are bound to forget after doing it a few times.
Isn't there a way we can include the cosmo revision in the javascript  
URL?

Maybe we need to write s simple script that goes changes all the js  
URLs from js-0.7.0-SNAPSHOT/ to something like js-0.7.0-xxxx  where  
xxxx is the revision number after each build.

Wouldn't that be more reliable than expecting all testers to clear  
cache before testing?
Aparna


On Jul 26, 2007, at 5:00 PM, Bobby Rullo wrote:

> Anyone doing QA on Cosmo UI,
>
> It is important to clear your cache and restart the browser before  
> doing any testing. Otherwise, you could be (and likely are) using  
> code from a previous version.
>
> "But wait - we can't expect our users to do this!", you might say.
>
> That is true, but they won't to. Here's why:
>
> The url to a javascript file looks like this:
>
> http://example.com/chandler/js-0.7.0-SNAPSHOT/lib/dojo/dojo.js
>
> Notice within the URL there is the version number. The browser  
> knows that if request is made for something with the same URL as  
> something it has fetched before, it doesn't need to fetch it again,  
> it can get it from its cache (it's more complicated than this in  
> reality, there's headers and stuff involved that change this behavior)
>
> For us, since we're in the middle of working on 0.7 the URL always  
> says ".../js-0.7.0-SNAPSHOT/...".  Since this doesn't change for  
> us, the browser (incorrectly) assumes that it's the same resource,  
> that nothing has changed and it can just use cached content. So you  
> have to clear you cache.
>
> When it's released it will say ".../js-0.7.0/..." After the first  
> time a user loads the page, subsequent page loads will result in  
> getting cached JS files, since the browser (correctly, this time)  
> assumes that nothing has changed. This is the behavior we want.
>
> When there is new code to pushed out the URL will change to  
> something like - ".../js-0.7.1-SNAPSHOT/..." which will be a  
> completely new URL and therefore force the browser to fetch the  
> content.
>
> bobby
> _______________________________________________
> cosmo-dev mailing list
> cosmo-dev at lists.osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/cosmo-dev



More information about the cosmo-dev mailing list