List Info

Thread: QA'ers - Clear your Cache!




QA'ers - Clear your Cache!
country flaguser name
United States
2007-07-26 19:00:52
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-devlists.osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/cosmo-d
ev

Re: QA'ers - Clear your Cache!
country flaguser name
United States
2007-07-26 19:49:46
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-devlists.osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/cosmo-d
ev

_______________________________________________
cosmo-dev mailing list
cosmo-devlists.osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/cosmo-d
ev

Re: QA'ers - Clear your Cache!
country flaguser name
United States
2007-07-26 21:29:27
On Jul 26, 2007, at 5:49 PM, Aparna Kadakia wrote:

> 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?

Yes, every time there is new code.

>
> 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?
>

Absolutely. It just requires someone to do it!



_______________________________________________
cosmo-dev mailing list
cosmo-devlists.osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/cosmo-d
ev

Re: QA'ers - Clear your Cache!
country flaguser name
United States
2007-07-26 22:28:54
On Jul 26, 2007, at 10:29 PM, Bobby Rullo wrote:

> On Jul 26, 2007, at 5:49 PM, Aparna Kadakia wrote:
>
>> 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?
>
> Yes, every time there is new code.
>
>>
>> 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?
>>
>
> Absolutely. It just requires someone to do it!

Well, it not exactly that simple.

The version is named SNAPSHOT to ensure that developers
always get the 
most recent versions of the source - maven 2 knows to check
the date 
and time of the jar files on the server and auto-update the
local copy 
if required.

This can be changed in two ways: one was backed out last
week because 
the plugin made svn checkouts a requirement.  The plugin
would have 
been able to make the version number equal to the svn
revision number.

The other way would be to tweak the linux full build for
cosmo and have 
everyone pull that build down when doing QA testing.

Either of these can be done, someone just needs to tell me
that it's a 
requirement.  Right now I have been holding back any changes
to avoid 
breaking the build during this time-sensitive period.

---
Bear

Build and Release Engineer
Open Source Applications Foundation (OSAF)
bearosafoundation.org
http://www.osafoundation
.org

bearcode-bear.com
http://code-bear.com

PGP Fingerprint = 9996 719F 973D B11B E111  D770 9331 E822
40B3 CD29



_______________________________________________
cosmo-dev mailing list
cosmo-devlists.osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/cosmo-d
ev

Re: QA'ers - Clear your Cache!
country flaguser name
United States
2007-07-27 13:31:14
I hope this helps everyone a little.


-Mikeal


On Jul 26, 2007, at 8:28 PM, Mike Taylor wrote:


On Jul 26, 2007, at 10:29 PM, Bobby Rullo wrote:

On Jul 26, 2007, at 5:49 PM, Aparna Kadakia wrote:

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?

Yes, every time there is new code.


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?


Absolutely. It just requires someone to do it!

Well, it not exactly that simple.

The version is named SNAPSHOT to ensure that developers always get the most recent versions of the source - maven 2 knows to check the date and time of the jar files on the server and auto-update the local copy if required.

This can be changed in two ways: one was backed out last week because the plugin made svn checkouts a requirement.  The plugin would have been able to make the version number equal to the svn revision number.

The other way would be to tweak the linux full build for cosmo and have everyone pull that build down when doing QA testing.

Either of these can be done, someone just needs to tell me that it's a requirement.  Right now I have been holding back any changes to avoid breaking the build during this time-sensitive period.

---
Bear

Build and Release Engineer
Open Source Applications Foundation (OSAF)
bearosafoundation.org">bearosafoundation.org

bearcode-bear.com">bearcode-bear.com

PGP Fingerprint = 9996 719F 973D B11B E111  D770 9331 E822 40B3 CD29


_______________________________________________
cosmo-dev mailing list
cosmo-devlists.osafoundation.org">cosmo-devlists.osafoundation.org

Re: QA'ers - Clear your Cache!
country flaguser name
United States
2007-07-27 16:05:04
This will be reliable most of the time. However, the JS files are affected by the behavior causing bug 9715, so the only truly reliable way to clear the cache is to restart Firefox. 

-Travis

On Jul 27, 2007, at 11:31 AM, Mikeal Rogers wrote:

I hope this helps everyone a little.


-Mikeal


On Jul 26, 2007, at 8:28 PM, Mike Taylor wrote:


On Jul 26, 2007, at 10:29 PM, Bobby Rullo wrote:

On Jul 26, 2007, at 5:49 PM, Aparna Kadakia wrote:

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?

Yes, every time there is new code.


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?


Absolutely. It just requires someone to do it!

Well, it not exactly that simple.

The version is named SNAPSHOT to ensure that developers always get the most recent versions of the source - maven 2 knows to check the date and time of the jar files on the server and auto-update the local copy if required.

This can be changed in two ways: one was backed out last week because the plugin made svn checkouts a requirement.  The plugin would have been able to make the version number equal to the svn revision number.

The other way would be to tweak the linux full build for cosmo and have everyone pull that build down when doing QA testing.

Either of these can be done, someone just needs to tell me that it's a requirement.  Right now I have been holding back any changes to avoid breaking the build during this time-sensitive period.

---
Bear

Build and Release Engineer
Open Source Applications Foundation (OSAF)
bearosafoundation.org">bearosafoundation.org

bearcode-bear.com">bearcode-bear.com

PGP Fingerprint = 9996 719F 973D B11B E111  D770 9331 E822 40B3 CD29


_______________________________________________
cosmo-dev mailing list
cosmo-devlists.osafoundation.org">cosmo-devlists.osafoundation.org

_______________________________________________
cosmo-dev mailing list
cosmo-devlists.osafoundation.org">cosmo-devlists.osafoundation.org

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )