Method and device for improving web page loading speed
By identifying and replacing the target script information in the web page content code with compressible alternative information in scripting language websites such as JSP and PHP, the problem of slow web page loading speed is solved, and effective compression of web page content and increased loading speed are achieved.
Patent Information
- Application Number
- CN202110196242.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-22
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-02-22
AI Technical Summary
Existing technologies cannot effectively improve the web page loading speed of websites using scripting languages such as Java Server Pages (JSP) and Hypertext Preprocessor PHP (PHP).
By reading the web page content code, identifying the target script information and replacing it with compressible alternative information, and then compressing the replaced content, ensuring that the original script logic remains unchanged.
Improved web page loading speed and solved the problem of slow loading caused by the inability to compress script information.
Smart Images

Figure CN114969596B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of Internet technology, and in particular to a method and device for improving web page loading speed. Background Art
[0002] With the development of mobile internet and the widespread use of electronic devices like smartphones, users can now access information from various websites using their smartphones. The speed at which website content loads directly impacts how efficiently users access information. To improve user information acquisition efficiency, it's crucial to increase website page loading speed.
[0003] In related technologies, the method to improve the speed of website pages is mainly to compress the resources in the website pages for transmission. There are two main methods to compress website page resources. One is to optimize the server side, such as turning on the GZip compression function; the other is to optimize the web page code layer, such as reducing the number of references to js, css, jpg and other resources, and merging or compressing web page resources.
[0004] However, the above method cannot be applied to all web pages. For example, for scripting language websites such as Java Server Pages (JSP) and Hypertext Preprocessor PHP, the existing method cannot be applied to improve the web page loading speed, which also results in a low web page content loading speed. Summary of the Invention
[0005] The embodiments of the present invention provide a method and device for improving web page loading speed, so as to solve the problem in the prior art that for scripting language websites such as JSP and PHP, the existing methods cannot be applied to improve web page loading speed, resulting in low web page content loading speed.
[0006] A first aspect of an embodiment of the present invention provides a method for improving web page loading speed, comprising:
[0007] Read the web page content code to be loaded;
[0008] Identifying target script information in the webpage content code according to a pre-configured file, wherein the pre-configured file contains the script information to be identified;
[0009] Replacing the target script information with corresponding replacement information, wherein the replacement information is compressible information;
[0010] The replaced web page content is compressed to obtain compressed web page content, so that the compressed web page content is loaded when the web page content is loaded.
[0011] Optionally, after replacing the target script information with corresponding replacement information, the method further includes:
[0012] A replacement log is recorded, where the replacement log includes the replaced target script information and the replacement information after the replacement.
[0013] Optionally, the method further includes:
[0014] According to the replacement log, a restoration operation is performed on the compressed webpage content to obtain a restored webpage content code.
[0015] Optionally, the replacement information includes a number, and the target script information and the number are in a one-to-one correspondence;
[0016] The restoring operation on the compressed webpage content according to the replacement log includes:
[0017] identifying corresponding replacement information in the compressed webpage content according to the number in the replacement information in the replacement log;
[0018] The replacement information corresponding to the number in the replacement information in the replacement log is replaced with the target script information in the replacement log.
[0019] Optionally, the method further includes:
[0020] The restored webpage content code is saved.
[0021] Optionally, identifying target script information in the webpage content code according to a pre-configured file includes:
[0022] Determining a corresponding regular expression based on the script information to be identified, wherein the regular expression includes the webpage type and the format information of the script to be identified;
[0023] According to the configuration file, regular expressions are used to identify target script information in the webpage content code that matches the webpage type and the format information.
[0024] A second aspect of an embodiment of the present invention provides an apparatus for improving web page loading speed, comprising:
[0025] A reading module, used to read the web page content code to be loaded;
[0026] an identification module, configured to identify target script information in the webpage content code according to a pre-configured file, wherein the pre-configured file contains the script information to be identified;
[0027] A replacement module, configured to replace the target script information with corresponding replacement information, wherein the replacement information is compressible information;
[0028] The compression module is used to compress the replaced web page content to obtain compressed web page content, so as to load the compressed web page content when loading the web page content.
[0029] A third aspect of an embodiment of the present invention provides a computer device, comprising: at least one processor and a memory;
[0030] The memory stores computer-executable instructions;
[0031] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method for improving web page loading speed described in the first aspect of the embodiment of the present invention.
[0032] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method for improving web page loading speed described in the first aspect of an embodiment of the present invention is implemented.
[0033] A fifth aspect of an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the method for improving web page loading speed described in the first aspect of an embodiment of the present invention.
[0034] An embodiment of the present invention provides a method and device for improving the loading speed of a web page, wherein the method reads the web page content code to be loaded; then identifies the target script information in the web page content code according to a pre-configured file, wherein the pre-configured file contains the script information to be identified; replaces the identified target script information with corresponding replacement information, wherein the replacement information is compressible information; replaces the script information by identifying the script part of the web page content, ensuring that the original script logic does not change, and since the replacement information can be compressed, it can effectively solve the problem that the web page cannot be compressed, and then compresses the web page content after replacement to obtain compressed web page content, so that the compressed web page content is loaded when the web page content is loaded, thereby improving the loading speed of the web page and solving the problem of slow web page loading speed caused by the inability to compress the web page content. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 is an application scenario diagram of a method for improving web page loading speed shown in an exemplary embodiment of the present invention;
[0037] Figure 2 is a flow chart of a method for improving web page loading speed according to an exemplary embodiment of the present invention;
[0038] Figure 3 is a flow chart of a method for improving web page loading speed according to another exemplary embodiment of the present invention;
[0039] Figure 4 is a schematic structural diagram of a device for improving web page loading speed according to an exemplary embodiment of the present invention;
[0040] Figure 5 It is a structural diagram of a computer device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0042] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the invention described herein can, for example, be implemented in orders other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or apparatus that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatus.
[0043] With the development of mobile internet and the widespread use of electronic devices like smartphones, users can now access information from various websites using their smartphones. The speed at which website content loads directly impacts how efficiently users access information. To improve user information acquisition efficiency, it's crucial to increase website page loading speed.
[0044] In the related art, the main method for improving website page speed is to compress the resources in the website page for transmission. There are two main methods for compressing website page resources: one is to optimize the server side, such as enabling the GZip compression function; the other is to optimize the web page code layer, such as reducing the number of references to resources such as JS, CSS, and jpg, and merging or compressing web page resources. However, these methods cannot be applied to all web pages. For example, for scripting language websites such as Java Server Pages (JSP) and Hypertext Preprocessor (PHP), existing methods cannot be used to improve page loading speed, which also results in slow web content loading speed.
[0045] In response to this defect, the technical solution of the present invention mainly lies in: reading the web page content code to be loaded; then identifying the target script information in the web page content code according to a pre-configured file, wherein the pre-configured file contains the script information to be identified; replacing the identified target script information with corresponding replacement information, wherein the replacement information is compressible information; by identifying the script part of the web page content, replacing the script information to ensure that the original script logic does not change, and since the replacement information can be compressed, it can effectively solve the problem that the web page cannot be compressed, and then compress the web page content after replacement to obtain the compressed web page content, so that the compressed web page content is loaded when the web page content is loaded, thereby improving the web page loading speed and solving the problem of slow web page loading speed caused by the inability to compress the web page content.
[0046] Figure 1 2 is an application scenario diagram of a method for improving web page loading speed shown in an exemplary embodiment of the present invention.
[0047] like Figure 1 As shown, the application scenario provided by this embodiment mainly includes a display terminal 101, a server 102 and a database 103. When the application chooses to open a website page on the display terminal, the server requests the corresponding web page content code from the database, and then sends the requested web page content to the display terminal for display.
[0048] Figure 2This is a flow chart of a method for improving web page loading speed according to an exemplary embodiment of the present invention. The execution subject of the method provided in this embodiment may be Figure 1 The server in the illustrated embodiment.
[0049] like Figure 2 As shown, the method provided in this embodiment may include the following steps.
[0050] S201, reading the webpage content code to be loaded.
[0051] Specifically, when the user selects a web page to be opened through the display terminal, the server generates a corresponding read instruction and sends the read instruction to the database to read the corresponding web page content code.
[0052] S202: Identify target script information in the webpage content code according to a pre-configured file, where the pre-configured file includes script information to be identified.
[0053] In some embodiments, a configuration file needs to be prepared first, in which the script information to be processed is defined, such as the format to be identified.<jsp:xxx xxx / > If you want to use jsp script code, define the format in the configuration file in advance.
[0054] Specifically, after the webpage content code is read, script information matching the script format defined in the configuration file is identified in the webpage content code according to the configuration file.
[0055] S203: Replace the target script information with corresponding replacement information, where the replacement information is compressible information.
[0056] Specifically, the target script information identified from the webpage content code is replaced with corresponding replacement information. The target script information is script information that cannot be compressed, and the replacement information can be compressed.
[0057] S204 , compressing the replaced web page content to obtain compressed web page content, so as to load the compressed web page content when loading the web page content.
[0058] Specifically, after replacing the target script information that cannot be compressed with the compressible replacement information, the web page after the replacement is equivalent to an ordinary Hypertext Markup Language (HTML) page, and the entire web page content after the replacement can be compressed, thereby improving the loading speed of the web page content.
[0059] In this embodiment, the web page content code to be loaded is read; then the target script information in the web page content code is identified according to a pre-configured file, wherein the pre-configured file contains the script information to be identified; the identified target script information is replaced with corresponding replacement information, wherein the replacement information is compressible information; by identifying the script part of the web page content, the script information is replaced to ensure that the original script logic does not change, and since the replacement information can be compressed, the problem that the web page cannot be compressed can be effectively solved, and then the web page content after replacement is compressed to obtain the compressed web page content, so that the compressed web page content is loaded when the web page content is loaded, thereby improving the web page loading speed and solving the problem of slow web page loading speed caused by the inability to compress the script information in some web page content codes.
[0060] In order to better understand the present application, the detailed implementation process of improving the web page loading speed will be described below.
[0061] Figure 3 is a flow chart of a method for improving web page loading speed according to another exemplary embodiment of the present invention. Figure 2 Based on the illustrated embodiment, a detailed implementation process of improving the web page loading speed is described.
[0062] like Figure 3 As shown, the method provided in this embodiment may include the following steps.
[0063] S301, reading the webpage content code to be loaded.
[0064] Specifically, when the user selects a web page to be opened through the display terminal, the server generates a corresponding read instruction and sends the read instruction to the database to read the corresponding web page content code.
[0065] S302: Identify target script information in the webpage content code according to a pre-configured file, where the pre-configured file includes script information to be identified.
[0066] In some embodiments, a configuration file needs to be prepared first, in which the script information to be processed is defined, such as the format to be identified.<jsp:xxx xxx / > If you want to use jsp script code, define the format in the configuration file in advance.
[0067] Specifically, after the webpage content code is read, script information matching the script format defined in the configuration file is identified in the webpage content code according to the configuration file.
[0068] In a possible embodiment, regular expressions are used according to a configuration file to identify target script information in the web page content code.
[0069] Specifically, according to the script information to be identified, a corresponding regular expression is determined, wherein the regular expression includes the web page type and the format information of the script to be identified; according to the configuration file, the regular expression is used to identify the target script information in the web page content code that matches the web page type and the format information.
[0070] For example, assume that the configuration file defines the format to be recognized as<jsp:xxx xxx / > The JSP script code is as follows:<jsp:[A-Za-z]+.+\ / > / g. The jsp in the expression indicates that the webpage type is JSP, indicating that JSP script code is to be identified. Then, script code that matches the regular expression format type is identified in the webpage content code.
[0071] S303: Replace the target script information with corresponding replacement information, where the replacement information is compressible information.
[0072] Specifically, the target script information identified from the webpage content code is replaced with corresponding replacement information. The target script information is script information that cannot be compressed, and the replacement information can be compressed.
[0073] For example, assume that the original JSP script information identified is<jsp:include page="commons / header.jsp" / > , then replace the JSP script information with: ____JSP__1001____ , "1001" in the replacement information is the number.
[0074] S304: Record a replacement log, where the replacement log includes the target script information to be replaced and the replacement information after the replacement.
[0075] Specifically, after each replacement of the script information, a replacement log corresponding to the replacement is recorded. The format of the replacement log includes the replaced target script information and the replacement information after the replacement.
[0076] For example, assume that the original JSP script information identified is<jsp:include page="commons / header.jsp" / > , replace the JSP script information with: ____JSP__1001____ , then the corresponding replacement log is:
[0077]
[0078] Among them, origin represents the target script information before replacement, and replace represents the replacement information.
[0079] It should be noted that the webpage content code contains a large amount of script information, which is replaced sequentially. Steps S302 and S303 need to be repeated until all script information in the webpage content code is replaced with the corresponding replacement information. Furthermore, as each script information in the webpage content code is replaced sequentially, a counter generates a corresponding number. Each replacement of script information is assigned a unique number, and the number corresponding to each replacement script information is written into the replacement information, thereby ensuring that the logical order of the script code is not disrupted.
[0080] For example, when replacing the first script information in the web page content code<jsp:include page="commons / header.jsp" / > When the counter generates the number 0001, the corresponding replacement information is ____JSP__0001____ , the corresponding replacement log is:
[0081]
[0082] Then the counter number increases by 1, and other script information in the web page content code continues to be replaced. The script information replaced for the second time is<jsp:include page="commons / header.jsp" / > , then the replacement information when replacing the second script information is: ____JSP__0002____ , the replacement log recorded after replacement is:
[0083]
[0084] After the second replacement, the counter is increased by 1 again, and then steps S302 and S303 are repeated until all script information in the web page content code is replaced with corresponding replacement information.
[0085] S305: compress the replaced webpage content to obtain compressed webpage content.
[0086] Specifically, after replacing the target script information that cannot be compressed with compressible alternative information, the web page after replacement is equivalent to an ordinary Hypertext Markup Language (HTML) page, and the html-minifier can be used to compress all the replaced web page contents to obtain compressed web page content.
[0087] S306: Perform a restoration operation on the compressed webpage content according to the replacement log to obtain a restored webpage content code.
[0088] Specifically, the compressed webpage content is restored according to the replacement log corresponding to each replacement.
[0089] In a possible embodiment, corresponding replacement information can be identified in the compressed web page content based on the number in the replacement information in the replacement log; and the replacement information corresponding to the number in the replacement information in the replacement log is replaced with the target script information in the replacement log.
[0090] For example, assume that the replacement log is:
[0091]
[0092] Then identify the format in the compressed web page content such as ____JSP__xxxx____ The code is then matched with the code numbered 0001, and the replacement information numbered 0001 is ____JSP__0001____ Replace it with the origin part in the replacement log, that is,<jsp:include page="commons / header.jsp" / > '. This method is used to restore all replacement information in the compressed web page content to the original script code based on all replacement logs.
[0093] S307: Save the restored webpage content code.
[0094] Specifically, the restored web page content code is saved to a new file to obtain a new JSP code.
[0095] In this embodiment, by extracting key script information from the web page content code, the logical page is converted into an ordinary HTML page and compressed. This not only solves the problem of slow web page loading speed caused by the inability to compress script information in some web page content codes, but also restores the logic of the compressed web page, achieving the effect of compressing the page without affecting the logic.
[0096] It should be noted that this solution is not only applicable to JSP-type web pages, but also to websites using scripting languages such as PHP. Furthermore, by using configuration files to define special syntax tags for projects (such as JSP script code format), special optimizations can be performed for different projects. For example, for websites using PHP scripting language, PHP script code can be pre-defined in the configuration file to replace the PHP script code in the web page content code with corresponding replacement information.
[0097] Figure 4 It is a structural diagram of an apparatus for improving web page loading speed according to an exemplary embodiment of the present invention.
[0098] like Figure 4 As shown, the device provided by this embodiment includes: a reading module 401, an identification module 402, a replacement module 403 and a compression module 404; wherein the reading module 401 is used to read the web page content code to be loaded; the identification module 402 is used to identify the target script information in the web page content code according to a pre-configured file, and the pre-configured file contains the script information to be identified; the replacement module 403 is used to replace the target script information with corresponding replacement information, and the replacement information is compressible information; the compression module 404 is used to compress the web page content after replacement to obtain compressed web page content, so that the compressed web page content can be loaded when the web page content is loaded.
[0099] Furthermore, the apparatus provided in this embodiment further includes: a recording module 405 for recording a replacement log after the target script information is replaced with the corresponding replacement information, wherein the replacement log includes the replaced target script information and the replacement information after the replacement.
[0100] Furthermore, the apparatus provided in this embodiment further includes: a restoration module 406, configured to perform a restoration operation on the compressed webpage content according to the replacement log to obtain a restored webpage content code.
[0101] Furthermore, the replacement information includes a number, and the target script information and the number are in a one-to-one correspondence;
[0102] The restoration module is specifically used for:
[0103] identifying corresponding replacement information in the compressed webpage content according to the number in the replacement information in the replacement log;
[0104] The replacement information corresponding to the number in the replacement information in the replacement log is replaced with the target script information in the replacement log.
[0105] Furthermore, the apparatus provided in this embodiment further includes: a saving module 407, configured to save the restored webpage content code.
[0106] Furthermore, the identification module is specifically used to:
[0107] Determining a corresponding regular expression based on the script information to be identified, wherein the regular expression includes the webpage type and the format information of the script to be identified;
[0108] According to the configuration file, regular expressions are used to identify target script information in the webpage content code that matches the webpage type and the format information.
[0109] For the specific functional implementation of each module provided in this embodiment, reference can be made to the detailed description in the above-mentioned method embodiment.
[0110] Figure 5 Schematic diagram of the hardware structure of the computer device provided in the embodiment of the present invention. Figure 5 As shown, the computer device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. The processor 501 and the memory 502 are connected via a bus 503.
[0111] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the method for improving the webpage loading speed in the above method embodiment.
[0112] The specific implementation process of the processor 501 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0113] In the above Figure 5 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0114] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0115] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0116] Another embodiment of the present application provides a computer-readable storage medium having computer-executable instructions stored therein. When a processor executes the computer-executable instructions, the method for improving web page loading speed in the above method embodiment is implemented.
[0117] Another embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for improving web page loading speed described in the first aspect of the embodiment of the present invention.
[0118] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. The computer-readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0119] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0120] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for improving web page loading speed, characterized in that: include: Read the web page content code to be loaded; Identifying target script information in the webpage content code according to a pre-configured file, wherein the pre-configured file contains the script information to be identified; Replacing the target script information with corresponding replacement information, wherein the target script information is script information that cannot be compressed, and the replacement information is compressible information; Compressing the replaced web page content to obtain compressed web page content, so as to load the compressed web page content when loading the web page content; After replacing the target script information with corresponding replacement information, the method further includes: Recording a replacement log, wherein the replacement log includes the target script information to be replaced and the replacement information after the replacement; According to the replacement log, a restoration operation is performed on the compressed webpage content to obtain a restored webpage content code.
2. The method according to claim 1, characterized in that The replacement information includes a number, and the target script information and the number are in a one-to-one correspondence; The restoring operation on the compressed webpage content according to the replacement log includes: identifying corresponding replacement information in the compressed webpage content according to the number in the replacement information in the replacement log; The replacement information corresponding to the number in the replacement information in the replacement log is replaced with the target script information in the replacement log.
3. The method according to claim 1, characterized in that The method further comprises: The restored webpage content code is saved.
4. The method according to any one of claims 1 to 3, characterized in that The step of identifying target script information in the webpage content code according to a pre-configured file includes: Determining a corresponding regular expression based on the script information to be identified, wherein the regular expression includes the webpage type and the format information of the script to be identified; According to the configuration file, regular expressions are used to identify target script information in the webpage content code that matches the webpage type and the format information.
5. A device for improving web page loading speed, characterized in that: include: A reading module, used to read the web page content code to be loaded; an identification module, configured to identify target script information in the webpage content code according to a pre-configured file, wherein the pre-configured file contains the script information to be identified; A replacement module, configured to replace the target script information with corresponding replacement information, wherein the target script information is script information that cannot be compressed, and the replacement information is compressible information; A compression module, configured to compress the replaced web page content to obtain compressed web page content, so as to load the compressed web page content when loading the web page content; A recording module is used to, after replacing the target script information with the corresponding replacement information, Recording a replacement log, wherein the replacement log includes the target script information to be replaced and the replacement information after the replacement; The restoration module is used to restore the compressed web page content according to the replacement log to obtain a restored web page content code.
6. A computer device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method for improving web page loading speed according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the method for improving web page loading speed according to any one of claims 1 to 4 is implemented.
8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for improving web page loading speed according to any one of claims 1 to 4 is implemented.