Hi,
I have read previous posts on Flex framework caching, did some
experiments with different compiler options and searched Google. Many
posts advocate using the framework cache in general, however what is
your opinion for this specific case.
I am working on the app having 1.6Mb in size when compiled with Flex
framework statically linked. If I use framework RSL, the app size
goes down to 1.2Mb. The goal I'm trying to achieve is to have the app
downloaded as fast as possible the first and subsequent times users
visit the site.
Originally I thought it would be a good idea to use framework caching
- the first time users would incur slight penalty 0.1Mb (1.2+0.5 vs
1.6) vs subsequent downloads of 1.2Mb. Unless a framework is cached
already by visiting some other app (I think the percentage of our
users having the framework already cached by visiting other website is
very small).
That penalty of 0.1M does not seem as much, but should result in
longer than 10% delay because there will 2 separate http requests.
The bigger concern is that after the first visit our users will
already have the application cached in the browser cache and will load
the app from there when they subsequently visit. Of course the cache
could be cleared, or we can release a newer version, but in majority
of cases users should be getting the app from the cache. Another
drawback of using cache is extra deployment configuration (ant build
scripts and deploying .swf and .swz) and more importantly running the
app from Flash Player would require different security permissions
because the app would first download the framework into cache if it's
not present. I suspect that the app would need to be marked as a
trusted file using Flash Player Settings Manager, otherwise it would
result in Security Sandbox violation.
With all that said, I think in general it is worth caching the
framework, but in this particular case I see more disadvantages than
advantages. Maybe in a year or so when enough people get the
framework cached on the FP cache, it'll be worth it, but for now I
don't see worth doing it because my goal is to minimize the download
time of the app the first time a user visits our website and caching
actually makes it longer. So I'll be turning my attention to modules.
What is your opinion for this case?