flex - Checking if Browser is using Cached SWC/SWF? -
How do you know that the browser is actually using cached SSF / Library for Flex projects? I want to be able to do things different from the preloader whether the user has never downloaded the library or not. He has already cached it by his browser. Is this possible?
I am not aware of any standard way to do this.
You can declare a public static statute VERSION_ID: string
in a main code and change its value in each build. Now if you pass the latest version ID using the html query parameter in the preloader, you can read it in the preloader and then compare this version ID with the version ID of the loaded SWF. If they do not match, then you have a cached version.
You can prevent preloader SWF from caching by adding a random number to the SWF URL.
& lt; Embed src = "preloader SWF? Version id = 10 & amp; amp; & lt ;? php echo" rand = ". Rand (1, 10000)." \ ""? & Gt;
Comments
Post a Comment