I have been studying HTML5 for a while. Recently I am looking at its offline storage function, that is, adding pages or files that need to be locally cached to the list through manifest files, first, let's look at my definition.
To take care of not very familiar students, let me explain it first. First of all:
1 cache manifest is required, that is, declaration or definition (required );
2. Note that this can be written or not written. But when you change the page file or resource file, you must change the content of the manifest file to display the page in time ~ You know, you 'd better write a version;
3 cache: declares that the following lists are all resources to be cached. This identifier can be written or not written, because if it is not written, these resources will also be considered as needing to be cached. In fact, there are two identifiers, one is "Network:" and the other is "fallback". The resource list under "Network:" indicates that network access is required. "fallback: the resource list in the "resource list" column indicates how to deal with the resource when it cannot be found (for example,/xxx.html/404.html)
4. These resource names represent the list information that we want to locally cache;
Add secret to manifest ,:
Now the problem is coming. I refreshed the browser and found that all the styles and scripts referenced on the page could not be found:
At that time, I was shocked ~~ Resource reference in Region:
Then change the version in the manifest file and refresh the file. I found that the version is still invalid ~ This is why external reference resources are still inaccessible when there is a URL ?!
Looking at the information in the chrome debugging tool, I suddenly realized that ~~
The so-called offline storage is of course TMD. It puts the loaded pages or resources locally and does not display them through servers such as IIS or Apache .. it's no wonder that even the complete URL of the resource cannot be displayed. even if you disable IIS or Apache, the page will still be displayed. To access the resource file, you must add the resource file to the manifest list:
PS: (this is the final complete manifest list)
Well, this is also an interesting question I have found since I recently studied offline storage. Welcome to discuss and draw bricks ~