Browser Cache Issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I wanted to give an update on recent changes to fix browser cache issues that many of us have experienced. We've been slowly chipping away at optimizing how the content for the viewer gets downloaded and how we securely, but flexibly retrieve content from the cache. It's over my head a bit so I won't try to give the full technical description, but I am developing apps just like you, so I know some of the issues you might run into and how to get around them.
1) It has often been the case that you had to frequently clear the browser cache when upgrading to new versions of the viewer or switching between the same app deployed in different domains (e.g., localhost vs. a web domain).
2) With a recent addition to the security/caching mechanism, we inadvertanly exposed a Cross-Origin problem with the static Viewer assets (materials and other supporting static content). That change happened last week and some of you complained that your models stopped loading (I experienced the same thing). Likely, you would have seen a message like the following:
This happened because the Viewer's static assets were being requested from two different domains. If you were only running a single app that used the viewer, you might not have noticed the problem, but anyone running multiple apps (including someone else's sample app from this site), would likely have encountered the problem on the second app loaded.
** This problem has been fixed and you SHOULD be back to normal now. Make sure to start with a clean browser cache just to make sure, but going forward, we shouldn't have to be so agressive about cleaning the cache.
There are two remaing problems you might run into in more advanced cases during development.
1) If you try to retrieve the same URN for a model from two different apps, you will run into the same problem. I have this case in my sample apps because I re-use the same models for a couple different samples, but it likely wouldn't happen in a real app.
2) If you start up two different apps that have the same domain, but a different port number, you will still have a conflict. This could happen if you are using an editor like Brackets that creates the web-server for your app to run in, and uses a different port for each app.
If you see an error like the following:
NOTE: this looks like the previous error but it is failing when trying to load the URN for the model, not for the static assets of the viewer (as in previous case).
If this happens, just run each app in its own Chrome Incognito window (or clear the cache between loading of each app). We will fix these two cases ASAP.
Please let us know if you observe any other issues like this so we know we've covered all the possible scenarios. Sorry for the inconvenience...
JimA