PDA

View Full Version : browser caching of modules


simeyla
08-14-2008, 09:14 PM
i have a flex application with several modules.

i need to figure out a way to version the modules so they are not cached in the browser unless the version hasnt changed. i end up with incompatible swfs in such cases. i cannot rely on the browser to be smart enough.

the only way i can come up with a solution now is to have a 'master' version number which is fed into my main application from the containing aspx page. this version number is appended to the module filename when its loaded.

i.e. loadModule("module1.swf?version=" + _masterVersionNumber);

Is this really the best solution? it seems that macromedia havent even considered this - or i'm missing something. i've looked in the documentation several times.

it needs to work if the user has 'never' selected for their 'check for new versions' option but I dont want it to reload from the server if the version hasnt changed.

-simon