-
Notifications
You must be signed in to change notification settings - Fork 106
App cache development issues. #37
Comments
Locally? On prod? |
My web browsers don't seem to care. Are you sure |
Positive, just checked. Try changing the contents of the |
Turns out you're right. I missed this the first time I read this article:
Yesterday I did a lot of work to clean up the repo. I also simplified the build/dev process; all files are now compiled with I have two more things I want to do in this area, one of them addressing this issue: 1. Speed up the compilation to under 3 seconds. (#25) 2. Automate updating the This means commits will always have to include changes to this file, which kind of sucks, but I can't think of a better solution besides removing the appcache entirely, or Appcache was designed exactly for apps like this, so I'd like to keep it if possible. How does that sound? |
Appcache is more of a douchebag than I realized. For instance, I just deployed the tooltips feature. Given how appcache works, when I refreshed production for the first time the CSS and JS was updated but After I refreshed a second time, since appcache knew at this point that the cache had been invalidated, the new That means that all the cached files are not invalidated at the same time. All returning visitors will have to get a page load where all the tool icons are empty. If you ask me, that's plain stupid. Seriously considering forgetting about the whole thing and removing it; so far it has given me way more trouble than it's worth. |
If the request for the manifest responds with a 404, then the browser will disable AppCache behaviour. So, what you may be able to do is temporarily hide or remove the manifest file when you are doing upgrades, then put it back once you're happy with the behaviour. Also, there are JavaScript events for AppCache. So you may be able to ask the user to refresh the page or something when the manifest has changed. |
Well hopefully the app continues to be actively developed and I deploy to production frequently, so there won't be a point where I'm happy with the behavior for good. I'd like appcache to always be there, but it works in a way that sucks and makes it unviable. I can't have users coming back and getting updated versions of certain pages and old versions of the html page. That's nuts. Deploys shouldn't break the experience. I may be misunderstanding something, but from what I've read so far this behavior is intentional and mandatory. I'll do more research, but appcache may have to go. |
I personally am in favour of dynosrc-esque style "cache"s. I.e. don't just suppose a cached asset is valid for the given duration, check the SHA's with the server, download changes, not new files. |
However its caching things I can't clear it as normal, and my local
index.html
refuses to refresh in chrome.The text was updated successfully, but these errors were encountered: