HTML5 offline storage

Source: Internet
Author: User

1. Write the manifest File

Format:
Cache manifest // the file to be cached
#1.0.0.1 // version number. It is used to update the cache when the script is updated.
Ajaxflow.png
Bgimg.png
Blue_glass.png
Buttom.png
Copycodehighlight.gif
Docindex.png
Network: // note that a colon must be added to the resources listed in the network. The resources are obtained from the network regardless of whether the cache exists or not.
../JS/jquery-1.7.min.js
../JS/jquery. Corner. js
2. Specify the file <HTML manifest = "./examples/images/image. manifest"> On the HTML page.
3. Configure the server. Here I configure the Tomcat server. The specific steps are: Find the Web. xml file under the conf file of the service and add the following file.
<Mime-mapping>
<Extension> manifest </extension>
<Mime-type> text/cache-manifest </mime-type>
</Mime-mapping>
Note: You may not need to use the manifest file or another name. For example, PHP file, but If php file is used. Write the server configuration file like this
<Mime-mapping>
<Extension> php </extension>
<Mime-type> text/cache-php </mime-type>
</Mime-mapping>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.