Jump to content
Search Community

Problem with Browser Cache Loadermax?

matthewwilliams test
Moderator Tag

Recommended Posts

I am having an issue when loading an xml file which contains serveral "SWFLoaders"... I noticed while debugging with Charles or Tamperdata that the XMLFile that has the SWFLoaders get loaded multiple times.

 

My issue is that if the user exits the application sometimes the XML file (Main configuration for the application) becomes corrupt in Firefox Cache. The result is that the next time the application is started it will not run. The xml file has been partially loaded and is in the browser cache but is corrupt.

 

I am wondering if there is way to handle this? I can't handle it when the app starts since the app won't start if there is a partially loaded xml in the Browser cache. And I can't control if a user quits the app by closing a browser window.

 

Any ideas. Is this a known issue?

Link to comment
Share on other sites

Unless you turn the auditSize feature to false, a LoaderMax instance will briefly open a URLStream for each file that doesn't have an estimatedBytes defined so that it can determine its size. This process is very quick and each URLStream is closed as soon as it receives the file size data. So it's completely normal for you to see 2 loads of each file. Of course you can turn that feature off or make sure you define estimatedBytes for each file to avoid the auditing.

 

Two suggestions for you:

 

1) Make sure you download the latest version of LoaderMax (v1.6 as of tonight)

 

2) Set noCache:true on your loaders so that you don't run into any browser caching issues like you did previously. This has nothing to do with LoaderMax, by the way - A few browsers just don't handle the closing of connections very well and occasionally use the partially-loaded file in the cache instead of recognizing that it's partially loaded and requesting the full file from the server.

 

Please let us know if that resolves things for you.

Link to comment
Share on other sites

Yes it seems to work okay setting the noCache to true. However, my idea was that noCache was good for testing but once the app was complete I would rather have the loadedswfs cached for performance. I have not seen the cache break since updating the code. I will keep you posted.

 

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...