Manifest save for self

Source: Internet
Author: User

First, using the HTML5 caching mechanism

1. First Rule code: m.manifest

Cache manifest# 2015-04-24 14:20# directly cached files Cache:/templates/specialty/css/style.css/templates/specialty/js/jquery.js /templates/specialty/js/index.js/templates/specialty/js/custom.js/templates/specialty/js/97zzw.jsnetwork:*

Cache: Files that need to be cached

Network: Files that need to be loaded from the Web

Of course there are other parameters, but I only test these; note: It is not cached if it is changed frequently, and if the cache can be modified by modifying the manifest file, let the browser recreate the cache.

2. Add a rule file to

<! DOCTYPE html>

3.manifest files need to be configured with the correct mime-type, i.e. "text/cache-manifest". Must be configured on the Web server.

If you are using Apache, you can add it in. htaccess:

AddType text/cache-manifest Manifest

The above 3 steps are completed, then you can test the

Under Chrome:

Cache success! Continue testing ———— >

Status code 304, using caching.

Under Firefox:

Summary: When defining rules, be aware that you want to cache data that is not always updated, do not miss the network rules, and there is a noticeable increase in speed.

Manifest save for self

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.