[Overview of Web Cache Mechanism] 5-new ideas on Cache Mechanism in the web app age

Source: Internet
Author: User
ArticleDirectory
    • Client provides cache read/write capability

=== Index ====

[Overview of Web Cache Mechanism] 1-roles and types of Web Cache

[Overview of Web Cache Mechanism] 2-Web browser cache mechanism

[Overview of Web Cache Mechanism] 3-how to build a cacheable site

[Overview of Web Cache Mechanism] 4-Web Cache Mechanism in the HTML5 Era

[Overview of Web Cache Mechanism] 5-new ideas on Cache Mechanism in the web app age

================

The concept of Web apps has gradually been recognized by the industry. Major Internet companies have also launched web app development competitions to actively introduce them to their open platforms, which are well-known for stealing dishes like Facebook farm and Qzone. Web development has gradually moved from web pages to the web app era. For more information, see what Chao Shu shared on D2: video and slide from web page to web app.

Common architecture of Web apps

Take webqq as an example. All content of the webqq website is displayed on a page. The framework similar to the Windows operating system is its top-level container and framework, the kernel of alloyos is responsible for overall planning and management. Other modules, such as wallpaper setting, message center, and App Store, are embedded into top-level containers in the form of modules and IFRAME. With observation, more and more web applications tend to use this architecture, which is obvious. For example, the top-level framework can maintain a unchanged JavaScript context for ease of management; after the IFRAME of the module is disabled, the memory can be better released. The IFRAME security mechanism can be used to ensure the kernel security and stability to the maximum extent.

In fact, this web architecture also provides usCodeThe logic layer provides the possibility for web applications to implement caching.

Cache Ajax requests

Because the top-level framework page does not cause JavaScript context loss due to the adjustment and refresh, the Ajax requests required by the underlying layer or each module can be unified through the top-level framework after the request, it also provides API calls in the form of information services. For requests that do not have strong real-time requirements, the top-level framework can perform unified caching and regular updates. This approach can significantly reduce the number of requests, reduce network traffic, and indirectly reduce the pressure on the server without affecting the user experience.

Memory Cache using JavaScript

Similar to caching Ajax requests,ProgramOther data during running can be cached in the JavaScript context of the top-level container in a similar way.

 

New development direction of Web apps: Web-client Model

With the further development of Web apps, it seems that browsers are no longer able to block web applications from exploring more front-end and localized native apps. For example, the current qplus, doubanpod, and other applications all adopt the development mode combined with client and web. In this way, you can take advantage of the features of fast iterative web development and low UI development costs. You can also use the client capabilities to implement many unfeasible functions for the web. Taking qplus as an example, qplus not only embeds the WebKit kernel, but has not yet customized many convenient interfaces on WebKit, such as cross-web-client drag and drop, multi-thread download, etc. In this new mode of development, what should I consider about the development direction of Web cache?

Client provides cache read/write capability

We know that HTML5 localstorage only supports 5 MB of storage. We can use the localstorage design to allow clients to customize larger and more flexible local storage functions for the web. Then, the Web cache can do more.

 

As for the current development trend of Web apps, we have discussed what can be done in the Web cache field and what directions can be taken into consideration. Of course, these practices are unreasonable, and they are all worth discussing and discussing. If you have any ideas, you can contact and discuss them at any time.

 

Summary

This article attempts to summarize the current situation of Web Cache and the new directions that can be considered in the HTML5 and web app era. Due to the rush of time and limited ability to express generalization, there may be some improper expressions. Please refer to the discussion.

History

[Version 1.0] 2012-03-21 rehorn @ Tencent webplus team

 

References

Http://www.mnot.net/cache_docs/ 

Http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html 

Http://robbin.iteye.com/blog/462476

Http://www.procata.com/cachetest/

Http://www.web-caching.com/cacheability.html

Http://www.laruence.com/2010/03/05/1332.html

Http://sofish.de/1449

Http://www.fovweb.com/web/web-cache.html

 

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.