Supercharge Your Innovation With Domain-Expert AI Agents!

Method and system for caching script files

A script file and caching technology, applied in the field of data processing, can solve problems such as wasting communication traffic, achieve the effect of increasing speed and saving communication traffic

Inactive Publication Date: 2017-11-07
FUJIAN NETDRAGON WEBSOFT
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, different web pages may contain the same script file. If the second method is used to cache the script file, the cached script file needs to be loaded repeatedly during the process of accessing the web site, which wastes communication traffic.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for caching script files
  • Method and system for caching script files
  • Method and system for caching script files

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0068] This embodiment provides a method for caching script files, including:

[0069] S1. Configure a unique identifier for the script file stored in the server; specifically:

[0070] S11. The server acquires the name of the script file, the path of the script file, and the last modification time of the script file;

[0071] S12. The server generates a unique identifier corresponding to the script file according to the name, the path of the script file, and the last modification time;

[0072] S13. The server adds the unique identifier to the file name of the corresponding script file;

[0073] S14. The server adds the unique identifier to the start position of the corresponding script file;

[0074] S2. The server configures the identifier set corresponding to the webpage according to the script file included in the webpage;

[0075] S3. When the server obtains a loading request of any webpage from the client, send an identifier set corresponding to any webpage to the cl...

Embodiment 2

[0083] Such as image 3 As shown, this embodiment provides a system for caching script files, including a client 101 and a server 102;

[0084] Wherein, the client 101 includes a first comparison module 4, a third addition module 8, a second comparison module 9, an acquisition module 10, and a loading module 11;

[0085] The first comparison module 4 is used to compare the preset cache information table with the identifier set corresponding to any web page, and obtain the identifier set of the uncached script; the cache information table records that the client has cached The unique identifier of the script file;

[0086] The third adding module 8 is used for the client to add the identifier set of the uncached script to the preset cache information table;

[0087] The second comparison module 9 is used for the client to compare the preset cache information table with the identifier set corresponding to any webpage, and obtain the identifier set of the cached script;

[008...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the field of data processing, in particular to a method and system for caching script files. According to the method and system for caching the script files, each script file stored in a server side is allocated with a unique identifier; the server side is allocated with an identifier set corresponding to a web page according to the script file contained in the web page; when the server side obtains a loading request from any web page in a client side, an identifier set corresponding to the web page is sent to the client side; a preset caching information list is compared with the identifier set corresponding to the web page to obtain an identifier set of the script files which are not cached; the caching information list is used for recording the unique identifiers of the script files which are cached in the client side; the server side is used for sending a script file set corresponding to the identifier set of the script files which are not cached to the client side. In this way, the web page loading speed is higher, and meanwhile, the communication flow is saved.

Description

technical field [0001] The invention relates to the field of data processing, in particular to a method and system for caching script files. Background technique [0002] When the client's browser loads a webpage, it needs to send a request to the server for caching script files included in the webpage. Before caching each script file, the client needs to send a corresponding loading script request to the server, which increases communication overhead and slows down the loading speed of web pages. [0003] In order to solve the problem of slow loading of web pages, the following two ways of caching script files are often used: [0004] The first method: in order to reduce the number of script file requests at present, the web site merges multiple script files contained in the web site into a single file on the server side, and sends the combined script file when the client first visits the web site to the client. Although this method reduces the number of requests, it loa...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/30
CPCG06F16/9574
Inventor 刘德建陈丛亮郭玉湖
Owner FUJIAN NETDRAGON WEBSOFT
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More