Control caching of your RIA applications
There’s actually a chance that a user won’t see the latest version of your application, the chances are actually quite high for that to happen.
Well, I have my own two methods that I use to control this.
Method #1The first way to control this is by the use of a parameter attached to the file name. Lets say your file name is kenso.swf (original name I must say :-) ). If you try embedding it into the HTML you will found out it is being cached. If you update the file on the server, you won’t see the changes.
The solution for this is simply add a parameter to the file like so: kenso.swf?buildDate=29Jan2009, this will cache as a file, if you change the buildDate param you will see that the file is being pulled again from the server
Method #2This method is what I call overkill, but I did found myself using it a couple of times in the past. I won’t get into code (unless you ask me to…), but the idea is this. There’s a service managing the builds of the application. Each build of the application has an ID embedded inside the code like so:
REXML could not parse this XML/HTML: