recently, I researched on HTML5 application cache. I plan to use it to cache the whole website, including html,js,css and image.
but I have one concern about using application cache.
if in the future, we have to change the architecture, we may drop the application cache. but according to the specification, if the browser fail to download manifest file for update check, it will use the cached version of the website. that means the user never get the new site?!
So my question is, is there any misunderstanding above? and if not, is there any way for me to drop an application cache if the website already use it?
if the browser fail to download manifest file for update check, it will use the cached version of the website
That depends.
Case 1: If your browser can't connect to your webserver, it would probably use the application cache.
Case 2: If your browser can connect to your webserver, but the webserver returns HTTP status 404 or 410 for your manifest file, your application cache is marked as obsolete and will be removed completely by your browser. (see obsolete event in https://html.spec.whatwg.org/multipage/browsers.html#appcacheevents)
So the final answer is: to drop an application cache, return HTTP status code 404 or 410 for it's manifest file.