HTML5 AppCache Trial Summary

Source: Internet
Author: User

Today want to optimize the next project, try the next HTML5 AppCache, found still a bit of pit, and finally give up temporarily. Here are the two pits below.

1. AppCache also caches files that reference AppCache in addition to the files that are cached in the list. Like index.php, citing AppCache.

<manifest= "Demo.appcache"></html> 


Index.php will also be cached, and if there is any dynamic data in the index.php, the data will not be updated.

If you want to avoid this problem, then the content of the homepage must not be dynamic content, such as to change the index.php to index.html, and then use AJAX to request data to do the display. This requires some modification of the already written program.

2. AppCache Update cache is the version number in the comments in the AppCache file, if the version number is updated, the browser will download all the files that need to be cached, so that there will be multiple download requests at the same time, which sometimes does not meet the expectations.

Through the above two points, found that HTML5 some standards have yet to be strengthened and developed, at least appcache this feature is not as good as imagined. If you need to use it, make sure two points:

1. The homepage cannot be dynamic content

2. Ensure that the resources are not constantly changed, and then write into the AppCache, otherwise the cost of the update is relatively large.

HTML5 AppCache Trial Summary

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.