[flexcoders] Cache Buster, HTML Wrapper SOLVED

2009-01-22 Thread Cato Paus
Hi all, I have ben poking around on this Cache issue, and did find 
out this:

In some cases, the browser will not refresh your application 
properly, even if the cache has been emptied, which can be very 
frustrating.

by adding a script which will add a random number on the end of a 
query string in the filename, fooling the browser into thinking we 
want to access a unique URL each and every time the HTML page is 
refreshed. The term cache buster is a bit of a misnomer, since 
you're not really bypassing the browser cache, as the SWF will still 
get cached upon each and every page refresh. It's just that the 
browser will always fetch the SWF from the server instead of using 
the one that it already has in its cache, thus solving the browser 
cache latency problem.

changes in the index.template.html file is located in your project 
folder under html-template dir. alter this on line 72 if you are 
using the default settings in flex builder 3 and sdk 3.2:

AC_FL_RunContent(
src, ${swf}?nocache=+(new Date()).getTime(),

remember to clean project!!

Verify the query string has been added to the filename in the browser.
If you are using Firefox as your browser, you can do this by 
selecting Tools  Page Info  Media tab. 



RE: [flexcoders] Cache Buster, HTML Wrapper SOLVED

2009-01-22 Thread Tracy Spratt
Cool, that is the first and simplest full solution I have seen posted.
Excellent subject wording also, this will help many folks in the future.

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Cato Paus
Sent: Thursday, January 22, 2009 4:12 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cache Buster, HTML Wrapper SOLVED

 

Hi all, I have ben poking around on this Cache issue, and did find 
out this:

In some cases, the browser will not refresh your application 
properly, even if the cache has been emptied, which can be very 
frustrating.

by adding a script which will add a random number on the end of a 
query string in the filename, fooling the browser into thinking we 
want to access a unique URL each and every time the HTML page is 
refreshed. The term cache buster is a bit of a misnomer, since 
you're not really bypassing the browser cache, as the SWF will still 
get cached upon each and every page refresh. It's just that the 
browser will always fetch the SWF from the server instead of using 
the one that it already has in its cache, thus solving the browser 
cache latency problem.

changes in the index.template.html file is located in your project 
folder under html-template dir. alter this on line 72 if you are 
using the default settings in flex builder 3 and sdk 3.2:

AC_FL_RunContent(
src, ${swf}?nocache=+(new Date()).getTime(),

remember to clean project!!

Verify the query string has been added to the filename in the browser.
If you are using Firefox as your browser, you can do this by 
selecting Tools  Page Info  Media tab.