Dynamic Loading, caching, updating, and reuse of javascript (1) _ javascript skills

Source: Internet
Author: User
Many js files are often referenced in information management projects such as OA, MIS, and ERP, which requires technologies such as dynamic loading, caching, updating, and reuse, next we will discuss the scope of use:

Websites are not considered for OA, MIS, ERP, and other information management projects.


To complete a project, you often need to reference many js files, such as jQuery. js and easyUI. There are also some js Files written by myself. How can these files be easily loaded and how can the client promptly update the cache if the files change? It would be better to improve the running efficiency.


1. You can easily reference js files.

2. Try to use various caches to avoid reading files from the server frequently.

3. If js files are updated, added, or removed, the client must be automatically and immediately updated.

4. Reuse of Js files.

Page Structure:

Most projects such as OA and MIS are implemented using frameset or iframe. In this way, the concept of parent page and child page is introduced. We can use this to make an article.

A webpage can be divided into three parts: shell, home page, Tag, data list, and form (ADD and modify ). This is because the js loading method needs to use this page structure, which is precisely for this reason. Therefore, websites are not supported for the time being.

Look at this picture. Well, this is the structure.


Currently, web applications are increasingly dependent on various js types, such as third-party jQuery, easyUI, and my97, as well as various self-written js types. More and more functions need to be implemented, more and more js files need to be used, and the js files are frequently modified. So there are a lot of problems, for example, every page has to write a lot

Related Article

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.