CN104484383A - JS file processing method and device - Google Patents

JS file processing method and device Download PDF

Info

Publication number
CN104484383A
CN104484383A CN201410758273.2A CN201410758273A CN104484383A CN 104484383 A CN104484383 A CN 104484383A CN 201410758273 A CN201410758273 A CN 201410758273A CN 104484383 A CN104484383 A CN 104484383A
Authority
CN
China
Prior art keywords
file
loading
target web
loaded
webpage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410758273.2A
Other languages
Chinese (zh)
Other versions
CN104484383B (en
Inventor
冯鸳鹤
孙德彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201410758273.2A priority Critical patent/CN104484383B/en
Publication of CN104484383A publication Critical patent/CN104484383A/en
Application granted granted Critical
Publication of CN104484383B publication Critical patent/CN104484383B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a JS file processing method and device, wherein the JS file processing method comprises the following steps that a webpage loading request is received, wherein the webpage loading request is used for requesting the loading of a target webpage, the target webpage quotes a first JS file, the first JS file is a framework file used for loading a second JS file, and the second JS file is a JS file used for realizing the front end function; the target webpage is loaded on the basis of the webpage loading request, and in addition, the first JS file quoted by the target webpage is loaded on the target webpage; the second JS file is loaded through the first JS file. According to the method and the device provided by the invention, the problem of low webpage loading speed in the prior art is solved.

Description

JS document handling method and device
Technical field
The present invention relates to Web Page Processing field, in particular to a kind of JS document handling method and device.
Background technology
The rich front end phenomenon of current web is more and more serious, and a lot of front-end functionality is all need to quote third-party JS file to have come, so webpage loads quote the comparison normal method that JS file has become a kind of Website development.
Because JS file blocks loading mode, also just says if when webpage is sequentially loaded into JS file to only have and be completely loaded with the JS file quoted, just can continue the element on Web page loading after JS file; If JS file access time-out in this process, webpage also can be waited for always, goes to load other element after time-out again.Have a strong impact on webpage loading velocity like this, cause webpage speed slower.
For the problem that webpage loading velocity in prior art is slow, at present effective solution is not yet proposed.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of JS document handling method and device, to solve the problem that in prior art, webpage loading velocity is slow.
To achieve these goals, according to an aspect of the embodiment of the present invention, a kind of JS document handling method is provided.JS document handling method according to the present invention comprises: receive webpage load request, wherein, above-mentioned webpage load request is used for request of loading target web, above-mentioned target web quotes a JS file, an above-mentioned JS file is the document framework for loading the 2nd JS file, and above-mentioned 2nd JS file is the JS file for realizing front-end functionality; Load above-mentioned target web based on above-mentioned webpage load request and on above-mentioned target web, load the above-mentioned JS file that above-mentioned target web quotes; And by the above-mentioned 2nd JS file of an above-mentioned JS files loading.
Further, an above-mentioned JS file carries the location parameter of above-mentioned 2nd JS file, above-mentioned location parameter is for representing that above-mentioned target web loads the page location of above-mentioned 2nd JS file, wherein, comprised by the above-mentioned 2nd JS file of an above-mentioned JS files loading: pass through an above-mentioned JS file by above-mentioned 2nd JS files loading to above-mentioned page location based on above-mentioned location parameter.
Further, above-mentioned 2nd JS file comprises multiple JS file, an above-mentioned JS file carries the loading sequence of above-mentioned multiple JS file, wherein, comprised by the above-mentioned 2nd JS file of an above-mentioned JS files loading: load above-mentioned multiple JS file by an above-mentioned JS file successively according to above-mentioned loading sequence.
Further, before reception webpage load request, above-mentioned JS document handling method also comprises: create an above-mentioned JS file; The parameter of the loading sequence for representing above-mentioned multiple JS file is added in an above-mentioned JS file; And an above-mentioned JS file is referred to above-mentioned target web.
Further, comprised by the above-mentioned 2nd JS file of an above-mentioned JS files loading: after having loaded an above-mentioned JS file, and before having loaded above-mentioned target web, by the above-mentioned 2nd JS file of an above-mentioned JS file Asynchronous loading; Or after having loaded above-mentioned target web, by the above-mentioned 2nd JS file of an above-mentioned JS files loading.
To achieve these goals, according to the another aspect of the embodiment of the present invention, provide a kind of JS document handling apparatus.JS document handling apparatus according to the present invention can comprise: receiving element, for receiving webpage load request, wherein, above-mentioned webpage load request is used for request of loading target web, above-mentioned target web quotes a JS file, an above-mentioned JS file is the document framework for loading the 2nd JS file, and above-mentioned 2nd JS file is the JS file for realizing front-end functionality; First loading unit, for loading above-mentioned target web based on above-mentioned webpage load request and load the above-mentioned JS file that above-mentioned target web quotes on above-mentioned target web; And second loading unit, for by the above-mentioned 2nd JS file of an above-mentioned JS files loading.
Further, an above-mentioned JS file carries the location parameter of above-mentioned 2nd JS file, above-mentioned location parameter is for representing that above-mentioned target web loads the page location of above-mentioned 2nd JS file, wherein, above-mentioned second loading unit can comprise: the first load-on module, for passing through an above-mentioned JS file by above-mentioned 2nd JS files loading to above-mentioned page location based on above-mentioned location parameter.
Further, above-mentioned 2nd JS file can comprise multiple JS file, an above-mentioned JS file carries the loading sequence of above-mentioned multiple JS file, wherein, above-mentioned second loading unit can comprise: the second load-on module, for loading above-mentioned multiple JS file by an above-mentioned JS file successively according to above-mentioned loading sequence.
Further, above-mentioned JS document handling apparatus can also comprise: creating unit, for before reception webpage load request, creates an above-mentioned JS file; Adding device, for adding the parameter of the loading sequence for representing above-mentioned multiple JS file in an above-mentioned JS file; And precedents, for an above-mentioned JS file is referred to above-mentioned target web.
Further, above-mentioned second loading unit can comprise: the 3rd load-on module, for after having loaded an above-mentioned JS file, and before having loaded above-mentioned target web, by the above-mentioned 2nd JS file of an above-mentioned JS file Asynchronous loading; Or the 4th load-on module, for after having loaded above-mentioned target web, by the above-mentioned 2nd JS file of an above-mentioned JS files loading.
According to inventive embodiments, by receiving webpage load request, wherein, webpage load request is used for request of loading target web, target web quotes a JS file, and a JS file is the document framework for loading the 2nd JS file, and the 2nd JS file is the JS file for realizing front-end functionality; Based on webpage load request loaded targets webpage and the JS file that loaded targets webpage is quoted on target web; And by JS files loading a 2nd JS file, solve the problem that in prior art, webpage loading velocity is slow, reach the effect that webpage loading velocity is accelerated.
Accompanying drawing explanation
The accompanying drawing forming a application's part is used to provide a further understanding of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of the JS document handling method according to the embodiment of the present invention; And
Fig. 2 is the schematic diagram of the JS document handling apparatus according to the embodiment of the present invention.
Embodiment
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first ", " second " etc. in instructions of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged, in the appropriate case so that embodiments of the invention described herein.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
Embodiments provide a kind of JS document handling method.
Fig. 1 is the process flow diagram of the JS document handling method according to the embodiment of the present invention.As shown in Figure 1, to comprise step as follows for this JS document handling method:
Step S102, receives webpage load request, wherein, webpage load request is used for request of loading target web, target web quotes a JS file, and a JS file is the document framework for loading the 2nd JS file, and the 2nd JS file is the JS file for realizing front-end functionality.
Step S104, based on webpage load request loaded targets webpage and the JS file that loaded targets webpage is quoted on target web.
Step S106, by JS files loading a 2nd JS file.
The front-end functionality of website can be quoted third-party JS file and complete.Wherein, when providing the JS file of certain front-end functionality, at least two JS files can be provided, as a JS file and the 2nd JS file.One JS file may be used for the function realizing loading other JS files, one JS file is equivalent to a functional document framework, and because this JS file is document framework, its file content can be enough little, like this, a JS file of loading does not affect page loading substantially.
Particularly, when target web quotes JS file, only quote a JS file, and in a JS file, load the 2nd JS file again after a JS files loading completes, by loading the front-end functionality that the 2nd JS file realize target page is wanted to load.Wherein, the 2nd JS file can be a JS file, also can be multiple JS file.Such as the 2nd JS file comprises: JS file A, JS file B and JS file C.When the 2nd JS file comprises multiple JS file, if when providing third party JS file, the loading frame i.e. JS file that one very little can be first provided, after a JS files loading completes, a JS file A is loaded with specific load mode at concrete target pages again in a JS file, after JS file A has loaded, reload JS file B, finally, after JS file B has loaded, reload JS file C.Wherein, specific load mode can be the location parameter that carries according to himself of a JS file and sequence parameter, and this sequence parameter is the sequence parameter of loading the 2nd JS file, realizes the loading to the 2nd JS file.
According to the embodiment of the present invention, due to target web quote JS file time, only refer to a JS file, during loaded targets webpage, a JS file is loaded, because a JS file is that document framework loading velocity is fast, after a JS files loading completes, can other elements rapidly on loaded targets webpage and the 2nd JS file, like this, the loading velocity of the mode influences webpage avoiding the obstruction due to JS file to load, thus reach the effect improving webpage loading velocity.
Preferably, in embodiments of the present invention, one JS file carries the location parameter of the 2nd JS file, location parameter is for representing that target web loads the page location of the 2nd JS file, wherein, can be comprised by JS files loading a 2nd JS file: position-based parameter passes through a JS file by the 2nd JS files loading to page location.
Such as, when target web quotes a JS file, a JS file can be quoted at any page location of this webpage.Because a JS file carries the location parameter of the 2nd JS file, therefore, a JS file can be specified the 2nd JS file to load before </body> or be loaded at the page location of specifying.Like this, avoid each JS file and limit oneself refers in the page, cause and quote troublesome problem.
Preferably, in embodiments of the present invention, the 2nd JS file can comprise multiple JS file, and a JS file carries the loading sequence of multiple JS file, wherein, can be comprised by JS files loading a 2nd JS file: load multiple JS file by a JS file successively according to loading sequence.
Because a JS file carries the loading sequence of the 2nd JS file, therefore the loading sequence of the 2nd JS file is by a JS document control.Such as, the 2nd JS file comprises multiple JS file: JS file A, JS file B and JS file C.After a JS files loading completes, JS file A reloads JS file B after having been loaded by the loading sequence in a JS file, finally, reloads JS file C after JS file B has loaded.If there is JS file (as JS file B) larger or more consuming time in the 2nd JS file, the loading sequence of JS file B can be discharged to finally by a JS file.Particularly, order also can be adjusted to by the one JS file: in a JS file, first unblock loads JS file A, after JS file A has loaded, reloads JS file C, last after JS file C has loaded, reload JS file B larger or more consuming time.Like this, avoid to only have and be completely loaded with current JS file, just can continue the problem of other elements in load page.Further, also avoid due to JS file access time-out in loading procedure, the page can be waited for until go to load the problem of other elements after time-out more always.Owing to avoiding the problems referred to above, therefore reach the effect improving webpage loading velocity.
Preferably, in embodiments of the present invention, before reception webpage load request, JS document handling method can also comprise:
S2, creates a JS file.
S4, adds the parameter of the loading sequence for representing multiple JS file in a JS file.
S6, refers to target web by a JS file.
Before target web quotes a JS file, can be pre-created a JS file, and add the parameter of the loading sequence representing multiple JS file in a JS file, the plurality of JS file is the JS file in the 2nd JS file.2nd JS file multiple JS files that it comprises by the sequence parameter loading in a JS file.
Preferably, in embodiments of the present invention, can be comprised by JS files loading a 2nd JS file: after having loaded a JS file, and before having loaded target web, by JS file Asynchronous loading a 2nd JS file; Or, after having loaded target web, by JS files loading a 2nd JS file.
In the embodiment of the present invention, after having loaded a JS file, reload the web page element after this JS file, 2nd JS file can be loaded after a JS files loading is complete and before web page element has loaded, and also can be a JS files loading is complete after and web page element has loaded afterwards loading.
The embodiment of the present invention additionally provides a kind of JS document handling apparatus.This device can realize its function by computer equipment.It should be noted that, the JS document handling apparatus of the embodiment of the present invention may be used for performing the JS document handling method that the embodiment of the present invention provides, and the JS document handling apparatus that the JS document handling method of the embodiment of the present invention also can be provided by the embodiment of the present invention performs.
Fig. 2 is the schematic diagram of the JS document handling apparatus according to the embodiment of the present invention.As shown in Figure 2, this JS document handling apparatus can comprise: receiving element 10, first loading unit 20 and the second loading unit 30.
Receiving element 10 is for receiving webpage load request, wherein, webpage load request is used for request of loading target web, and target web quotes a JS file, one JS file is the document framework for loading the 2nd JS file, and the 2nd JS file is the JS file for realizing front-end functionality.
First loading unit 20 is for based on webpage load request loaded targets webpage and the JS file that loaded targets webpage is quoted on target web.
Second loading unit 30 is for passing through JS files loading a 2nd JS file.
The front-end functionality of website can be quoted third-party JS file and complete.Wherein, when providing the JS file of certain front-end functionality, at least two JS files can be provided, as a JS file and the 2nd JS file.One JS file may be used for the function realizing loading other JS files, one JS file is equivalent to a functional document framework, and because this JS file is document framework, its file content can be enough little, like this, a JS file of loading does not affect page loading substantially.
Particularly, when target web quotes JS file, only quote a JS file, and in a JS file, load the 2nd JS file again after a JS files loading completes, by loading the front-end functionality that the 2nd JS file realize target page is wanted to load.Wherein, the 2nd JS file can be a JS file, also can be multiple JS file.Such as the 2nd JS file comprises: JS file A, JS file B and JS file C.When the 2nd JS file comprises multiple JS file, if when providing third party JS file, the loading frame i.e. JS file that one very little can be first provided, after a JS files loading completes, a JS file A is loaded with specific load mode at concrete target pages again in a JS file, after JS file A has loaded, reload JS file B, finally, after JS file B has loaded, reload JS file C.Wherein, specific load mode can be the location parameter that carries according to himself of a JS file and sequence parameter, and this sequence parameter is the sequence parameter of loading the 2nd JS file, realizes the loading to the 2nd JS file.
According to the embodiment of the present invention, due to target web quote JS file time, only refer to a JS file, during loaded targets webpage, a JS file is loaded, because a JS file is that document framework loading velocity is fast, after a JS files loading completes, can other elements rapidly on loaded targets webpage and the 2nd JS file, like this, the loading velocity of the mode influences webpage avoiding the obstruction due to JS file to load, thus reach the effect improving webpage loading velocity.
Preferably, in embodiments of the present invention, one JS file carries the location parameter of the 2nd JS file, location parameter is for representing that target web loads the page location of the 2nd JS file, wherein, second loading unit 30 can comprise: the first load-on module, passes through a JS file by the 2nd JS files loading to page location for position-based parameter.
Such as, when target web quotes a JS file, a JS file can be quoted at any page location of this webpage.Because a JS file carries the location parameter of the 2nd JS file, therefore, a JS file can be specified the 2nd JS file to load before </body> or be loaded at the page location of specifying.Like this, avoid each JS file and limit oneself refers in the page, cause and quote troublesome problem.
Preferably, in embodiments of the present invention, 2nd JS file can comprise multiple JS file, one JS file carries the loading sequence of multiple JS file, wherein, second loading unit 30 can comprise: the second load-on module, for loading multiple JS file by a JS file successively according to loading sequence.
Because a JS file carries the loading sequence of the 2nd JS file, therefore the loading sequence of the 2nd JS file is by a JS document control.Such as, the 2nd JS file comprises multiple JS file: JS file A, JS file B and JS file C.After a JS files loading completes, JS file A reloads JS file B after having been loaded by the loading sequence in a JS file, finally, reloads JS file C after JS file B has loaded.If there is JS file (as JS file B) larger or more consuming time in the 2nd JS file, the loading sequence of JS file B can be discharged to finally by a JS file.Particularly, order also can be adjusted to by the one JS file: in a JS file, first unblock loads JS file A, after JS file A has loaded, reloads JS file C, last after JS file C has loaded, reload JS file B larger or more consuming time.Like this, avoid to only have and be completely loaded with current JS file, just can continue the problem of other elements in load page.Further, also avoid due to JS file access time-out in loading procedure, the page can be waited for until go to load the problem of other elements after time-out more always.Owing to avoiding the problems referred to above, therefore reach the effect improving webpage loading velocity.
Preferably, in embodiments of the present invention, JS document handling apparatus can also comprise: creating unit, for before reception webpage load request, creates a JS file; Adding device, for adding the parameter of the loading sequence for representing multiple JS file in a JS file; And precedents, for a JS file is referred to target web.
Before target web quotes a JS file, can be pre-created a JS file, and add the parameter of the loading sequence representing multiple JS file in a JS file, the plurality of JS file is the JS file in the 2nd JS file.2nd JS file multiple JS files that it comprises by the sequence parameter loading in a JS file.
Preferably, in embodiments of the present invention, the second loading unit 30 can comprise: the 3rd load-on module, for after having loaded a JS file, and before having loaded target web, by JS file Asynchronous loading a 2nd JS file; Or the 4th load-on module, for after having loaded target web, by JS files loading a 2nd JS file.
In the embodiment of the present invention, after having loaded a JS file, reload the web page element after this JS file, 2nd JS file can be loaded after a JS files loading is complete and before web page element has loaded, and also can be a JS files loading is complete after and web page element has loaded afterwards loading.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
In several embodiments that the application provides, should be understood that, disclosed device, the mode by other realizes.Such as, device embodiment described above is only schematic, the such as division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprises all or part of step of some instructions in order to make a computer equipment (can be personal computer, mobile terminal, server or the network equipment etc.) perform method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), portable hard drive, magnetic disc or CD etc. various can be program code stored medium.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a JS document handling method, is characterized in that, comprising:
Receive webpage load request, wherein, described webpage load request is used for request of loading target web, and described target web quotes a JS file, a described JS file is the document framework for loading the 2nd JS file, and described 2nd JS file is the JS file for realizing front-end functionality;
Load described target web based on described webpage load request and on described target web, load the described JS file that described target web quotes; And
By the 2nd JS file described in a described JS files loading.
2. JS document handling method according to claim 1, it is characterized in that, a described JS file carries the location parameter of described 2nd JS file, described location parameter is for representing that described target web loads the page location of described 2nd JS file, wherein, comprised by the 2nd JS file described in a described JS files loading:
A described JS file is passed through by described 2nd JS files loading to described page location based on described location parameter.
3. JS document handling method according to claim 1, it is characterized in that, described 2nd JS file comprises multiple JS file, and a described JS file carries the loading sequence of described multiple JS file, wherein, comprised by the 2nd JS file described in a described JS files loading:
Described multiple JS file is loaded successively according to described loading sequence by a described JS file.
4. JS document handling method according to claim 3, is characterized in that, before reception webpage load request, described JS document handling method also comprises:
Create a described JS file;
The parameter of the loading sequence for representing described multiple JS file is added in a described JS file; And
A described JS file is referred to described target web.
5. JS document handling method according to claim 1, is characterized in that, is comprised by the 2nd JS file described in a described JS files loading:
After having loaded a described JS file, and before having loaded described target web, by the 2nd JS file described in a described JS file Asynchronous loading; Or
After having loaded described target web, by the 2nd JS file described in a described JS files loading.
6. a JS document handling apparatus, is characterized in that, comprising:
Receiving element, for receiving webpage load request, wherein, described webpage load request is used for request of loading target web, described target web quotes a JS file, a described JS file is the document framework for loading the 2nd JS file, and described 2nd JS file is the JS file for realizing front-end functionality;
First loading unit, for loading described target web based on described webpage load request and load the described JS file that described target web quotes on described target web; And
Second loading unit, for passing through the 2nd JS file described in a described JS files loading.
7. JS document handling apparatus according to claim 6, it is characterized in that, a described JS file carries the location parameter of described 2nd JS file, described location parameter is for representing that described target web loads the page location of described 2nd JS file, wherein, described second loading unit comprises:
First load-on module, for passing through a described JS file by described 2nd JS files loading to described page location based on described location parameter.
8. JS document handling apparatus according to claim 6, it is characterized in that, described 2nd JS file comprises multiple JS file, a described JS file carries the loading sequence of described multiple JS file, wherein, described second loading unit comprises: the second load-on module, for loading described multiple JS file by a described JS file successively according to described loading sequence.
9. JS document handling apparatus according to claim 8, is characterized in that, described JS document handling apparatus also comprises:
Creating unit, for before reception webpage load request, creates a described JS file;
Adding device, for adding the parameter of the loading sequence for representing described multiple JS file in a described JS file; And
Precedents, for referring to described target web by a described JS file.
10. JS document handling apparatus according to claim 6, is characterized in that, described second loading unit comprises:
3rd load-on module, for after having loaded a described JS file, and before having loaded described target web, by the 2nd JS file described in a described JS file Asynchronous loading; Or
4th load-on module, for after having loaded described target web, by the 2nd JS file described in a described JS files loading.
CN201410758273.2A 2014-12-10 2014-12-10 JS document handling methods and device Active CN104484383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410758273.2A CN104484383B (en) 2014-12-10 2014-12-10 JS document handling methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410758273.2A CN104484383B (en) 2014-12-10 2014-12-10 JS document handling methods and device

Publications (2)

Publication Number Publication Date
CN104484383A true CN104484383A (en) 2015-04-01
CN104484383B CN104484383B (en) 2017-11-14

Family

ID=52758924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410758273.2A Active CN104484383B (en) 2014-12-10 2014-12-10 JS document handling methods and device

Country Status (1)

Country Link
CN (1) CN104484383B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045645A (en) * 2015-09-22 2015-11-11 广州神马移动信息科技有限公司 Webpage loading method, device and system
CN105183883A (en) * 2015-09-23 2015-12-23 北京奇虎科技有限公司 Page loading method and device
CN105468412A (en) * 2015-11-26 2016-04-06 金蝶软件(中国)有限公司 Dynamic packaging method and dynamic packaging device
CN106055575A (en) * 2016-05-19 2016-10-26 天脉聚源(北京)传媒科技有限公司 Method and device for optimized loading of website page
CN106293855A (en) * 2016-08-23 2017-01-04 上海创景计算机系统有限公司 The loading method of dependent file
CN107329785A (en) * 2017-06-27 2017-11-07 郑州云海信息技术有限公司 A kind of method and system of dynamic load JavaScript modules
CN107678820A (en) * 2017-09-29 2018-02-09 北京金山安全软件有限公司 Webpage processing method, device, server, terminal equipment and medium
CN111562949A (en) * 2019-01-29 2020-08-21 飞狐信息技术(天津)有限公司 Model file loading method and device
CN106294658B (en) * 2016-08-04 2020-09-04 腾讯科技(深圳)有限公司 Webpage quick display method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080271046A1 (en) * 2007-04-27 2008-10-30 Microsoft Corporation Dynamically loading scripts
CN101963987A (en) * 2010-09-30 2011-02-02 百度在线网络技术(北京)有限公司 Methods and equipments for generating and loading web page file
CN102043621A (en) * 2010-12-01 2011-05-04 北京迅捷英翔网络科技有限公司 Webpage development method based on Javascript tag library
CN102799640A (en) * 2012-06-27 2012-11-28 用友软件股份有限公司 Page loading device and page loading method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080271046A1 (en) * 2007-04-27 2008-10-30 Microsoft Corporation Dynamically loading scripts
CN101963987A (en) * 2010-09-30 2011-02-02 百度在线网络技术(北京)有限公司 Methods and equipments for generating and loading web page file
CN102043621A (en) * 2010-12-01 2011-05-04 北京迅捷英翔网络科技有限公司 Webpage development method based on Javascript tag library
CN102799640A (en) * 2012-06-27 2012-11-28 用友软件股份有限公司 Page loading device and page loading method

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045645A (en) * 2015-09-22 2015-11-11 广州神马移动信息科技有限公司 Webpage loading method, device and system
US10749927B2 (en) 2015-09-22 2020-08-18 Guangzhou Shenma Mobile Information Technology Co., Ltd. Webpage loading method, apparatus and system
CN105183883A (en) * 2015-09-23 2015-12-23 北京奇虎科技有限公司 Page loading method and device
CN105183883B (en) * 2015-09-23 2019-07-09 北京奇虎科技有限公司 Page loading method and device
CN105468412A (en) * 2015-11-26 2016-04-06 金蝶软件(中国)有限公司 Dynamic packaging method and dynamic packaging device
CN106055575A (en) * 2016-05-19 2016-10-26 天脉聚源(北京)传媒科技有限公司 Method and device for optimized loading of website page
CN106294658B (en) * 2016-08-04 2020-09-04 腾讯科技(深圳)有限公司 Webpage quick display method and device
CN106293855A (en) * 2016-08-23 2017-01-04 上海创景计算机系统有限公司 The loading method of dependent file
CN107329785A (en) * 2017-06-27 2017-11-07 郑州云海信息技术有限公司 A kind of method and system of dynamic load JavaScript modules
CN107678820A (en) * 2017-09-29 2018-02-09 北京金山安全软件有限公司 Webpage processing method, device, server, terminal equipment and medium
CN107678820B (en) * 2017-09-29 2021-08-24 北京金山安全软件有限公司 Webpage processing method, device, server, terminal equipment and medium
CN111562949A (en) * 2019-01-29 2020-08-21 飞狐信息技术(天津)有限公司 Model file loading method and device
CN111562949B (en) * 2019-01-29 2023-10-10 飞狐信息技术(天津)有限公司 Model file loading method and device

Also Published As

Publication number Publication date
CN104484383B (en) 2017-11-14

Similar Documents

Publication Publication Date Title
CN104484383A (en) JS file processing method and device
CN105045645B (en) Webpage loading method, Apparatus and system
CN103973635B (en) Page access control method and relevant apparatus and system
CN109257758B (en) Network capacity expansion method and device
CN110191494B (en) Network selection method, device and equipment
CN108777698A (en) Webpage storage method, system and block chain node device
CN106961454A (en) Document down loading method, device and terminal device
CN104537005A (en) Data processing method and device for webpage crawling
CN105487987A (en) Method and device for processing concurrent sequential reading IO (Input/Output)
CN104918119A (en) Video processing method based on iOS browser, and video processing apparatus based on iOS browser
CN104965798A (en) Data processing method, related device and data processing system
CN102916781A (en) Calibration method and calibration device
CN110770720B (en) Resource searching method and related products
US10775966B2 (en) Customizable autocomplete option
CN110414663A (en) The convolution implementation method and Related product of neural network
CN104918314B (en) A kind of AP power consumption method of adjustment and device
CN111680249B (en) Method and device for pushing presentation information
CN114422502A (en) Resource downloading method, computing device and storage medium
CN113076166A (en) Method and device for processing page
CN114039698A (en) Data sending and receiving method, device and equipment based on multiple frequencies
CN102708144B (en) Method and device for information processing
CN110765738A (en) System and method for generating card number and electronic equipment
CN111163123A (en) Service request processing method and device
CN105468603A (en) Data selection method and apparatus
CN105096978B (en) The name management method and terminal of a kind of playback equipment group

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: JS file processing method and device

Effective date of registration: 20190531

Granted publication date: 20171114

Pledgee: Shenzhen Black Horse World Investment Consulting Co.,Ltd.

Pledgor: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

Registration number: 2019990000503

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Patentee after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Patentee before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

PP01 Preservation of patent right

Effective date of registration: 20240604

Granted publication date: 20171114