CN106293855A - The loading method of dependent file - Google Patents

The loading method of dependent file Download PDF

Info

Publication number
CN106293855A
CN106293855A CN201610712440.9A CN201610712440A CN106293855A CN 106293855 A CN106293855 A CN 106293855A CN 201610712440 A CN201610712440 A CN 201610712440A CN 106293855 A CN106293855 A CN 106293855A
Authority
CN
China
Prior art keywords
file
key
determines
path
introduce
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.)
Pending
Application number
CN201610712440.9A
Other languages
Chinese (zh)
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.)
Upper Seabird Scape Computer System Co Ltd
Original Assignee
Upper Seabird Scape Computer System 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 Upper Seabird Scape Computer System Co Ltd filed Critical Upper Seabird Scape Computer System Co Ltd
Priority to CN201610712440.9A priority Critical patent/CN106293855A/en
Publication of CN106293855A publication Critical patent/CN106293855A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides the loading method of a kind of dependent file, it comprises the following steps: step one, first has to introduce this js file, and the js file of oneself definition one configuration, be also introduced into inside the page coming in the page;Step 2, at path, corresponding key_name and the respective dependent file of required js file good defined in config file;Step 3, determines and needs in a partial view to introduce which js file.The present invention can js file needed for on-demand loading, reduce the file request number of the page, it is also possible to synchronizing to load js file, just presenting this partial view until having loaded.

Description

The loading method of dependent file
Technical field
The present invention relates to a kind of loading method, in particular it relates to the loading method of a kind of dependent file.
Background technology
Use and have loading plug-in unit (require.js) etc. the most widely, be also to achieve asynchronous module to load, but using During there is so one problem, need to introduce certain js file if had in individual local page (js file be with js for expanding The file of exhibition name, is with the file of javascript scripting language), this partial view calls require.js and goes to draw Enter certain file, it is possible that the problem flashed of some pages when of loading this document for the first time, wish to this time In this partial view, synchronize load document, wait file loading to be just presented in webpage by this view after being over, but add at present Carry plug-in unit (require.js) can't realize.
Summary of the invention
For defect of the prior art, it is an object of the invention to provide the loading method of a kind of dependent file, it is permissible Js file needed for on-demand loading, reduces the file request number of the page, it is also possible to synchronize to load js file, until having loaded it Rear just present this partial view.
According to an aspect of the present invention, it is provided that the loading method of a kind of dependent file, it is characterised in that it includes following Step:
Step one, first has to introduce this js file, and the js file of oneself definition one configuration, is also introduced in the page Come inside the page;
Step 2, in the path of js file good required defined in config file, corresponding key_name and respective Dependent file;
Step 3, determines and needs in a partial view to introduce which js file.
Preferably, described step 2 comprises the following steps:
Step 2 11, a basic introducing root path of definition website;
Step 2 12, determines all js files that website may need, and comes corresponding each to respectively one key of definition Individual js file;
Step 2 13, it is intended that the key array of the dependent file of each js file;
Step 2 14, can define absolute path during corresponding js file, it is also possible to define a relative path, be now An elementary path good relative to predefined is calculated.
Preferably, described step 3 comprises the following steps:
Step 3 11, determines the file needing to synchronize to introduce, and the key of incoming correspondence and expression synchronize introduced Individual parameter;
Step 3 12, determines the file needing asynchronous introducing, the key of incoming correspondence and the readjustment after loading successfully Function.
Compared with prior art, the present invention has a following beneficial effect: (1) present invention can js needed for on-demand loading File, reduces the file request number of the page.(2) if necessary, can synchronize to load js file, until adding with an incoming parameter Load just presents this partial view after completing.(3) no matter it is to synchronize or the js file of Asynchronous loading, all can normally press structure Display is in source plate (source panel), and debugging is convenient.
Accompanying drawing explanation
By the detailed description non-limiting example made with reference to the following drawings of reading, the further feature of the present invention, Purpose and advantage will become more apparent upon:
Fig. 1 is the flow chart of the loading method of dependent file of the present invention.
Detailed description of the invention
Below in conjunction with specific embodiment, the present invention is described in detail.Following example will assist in the technology of this area Personnel are further appreciated by the present invention, but limit the present invention the most in any form.It should be pointed out that, the ordinary skill to this area For personnel, without departing from the inventive concept of the premise, it is also possible to make some deformation and improvement.These broadly fall into the present invention Protection domain.
As it is shown in figure 1, the loading method of dependent file of the present invention comprises the following steps:
Step one, first has to introduce this js file, and the js file of oneself definition one configuration, is also introduced in the page Come inside the page;
Step 2, in path, the corresponding key_name (key of required js file good defined in config (configuration) file Name) and respective dependent file;
Step 3, determines and needs in a partial view to introduce which js file.
Wherein, step 2 comprises the following steps:
Step 2 11, a basic introducing root path of definition website;
Step 2 12, determines all js files that website may need, and comes corresponding to respectively one key (key) of definition Each js file;
Step 2 13, it is intended that the key array of the dependent file of each js file;
Step 2 14, can define absolute path during corresponding js file, it is also possible to define a relative path, be now An elementary path good relative to predefined is calculated.
Wherein, step 3 comprises the following steps:
Step 3 11, determines the file needing to synchronize to introduce, and the key (key) of incoming correspondence and expression synchronize to introduce A parameter;
Step 3 12, determines the file needing asynchronous introducing, the key (key) of incoming correspondence and after loading successfully Call back function.
The present invention can js file needed for on-demand loading, reduce the file request number of the page.If necessary, the present invention can With an incoming parameter, synchronizing to load js file, just presenting this partial view until having loaded.Be no matter synchronize or The js file of Asynchronous loading, all can normally show in source plate (source panel) by structure, and debugging is convenient.
Above the specific embodiment of the present invention is described.It is to be appreciated that the invention is not limited in above-mentioned Particular implementation, those skilled in the art can make various deformation or amendment within the scope of the claims, this not shadow Ring the flesh and blood of the present invention.

Claims (3)

1. the loading method of a dependent file, it is characterised in that it comprises the following steps:
Step one, first has to introduce this js file, and the js file of oneself definition one configuration, is also introduced into the page in the page The inside is come;
Step 2, in path, corresponding key_name and the respective dependence of required js file good defined in config file File;
Step 3, determines and needs in a partial view to introduce which js file.
The loading method of dependent file the most according to claim 1, it is characterised in that described step 2 includes following step Rapid:
Step 2 11, a basic introducing root path of definition website;
Step 2 12, determines all js files that website may need, and carrys out each js corresponding to respectively one key of definition File;
Step 2 13, it is intended that the key array of the dependent file of each js file;
Step 2 14, can define absolute path during corresponding js file, it is also possible to define a relative path, be now relative Calculate in the elementary path that predefined is good.
The loading method of dependent file the most according to claim 1, it is characterised in that described step 3 includes following step Rapid:
Step 3 11, determines the file needing to synchronize to introduce, and the key of incoming correspondence and expression synchronize the ginseng introduced Number;
Step 3 12, determines the file needing asynchronous introducing, the key of incoming correspondence and the call back function after loading successfully.
CN201610712440.9A 2016-08-23 2016-08-23 The loading method of dependent file Pending CN106293855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610712440.9A CN106293855A (en) 2016-08-23 2016-08-23 The loading method of dependent file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610712440.9A CN106293855A (en) 2016-08-23 2016-08-23 The loading method of dependent file

Publications (1)

Publication Number Publication Date
CN106293855A true CN106293855A (en) 2017-01-04

Family

ID=57615880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610712440.9A Pending CN106293855A (en) 2016-08-23 2016-08-23 The loading method of dependent file

Country Status (1)

Country Link
CN (1) CN106293855A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145236A (en) * 2017-06-28 2019-01-04 艺龙网信息技术(北京)有限公司 Page file processing method, apparatus and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987851A (en) * 2005-12-22 2007-06-27 腾讯科技(深圳)有限公司 Updating display method for webpage data
CN102081633A (en) * 2009-11-27 2011-06-01 阿里巴巴集团控股有限公司 JavaScript file management method, device and system
CN104484383A (en) * 2014-12-10 2015-04-01 北京国双科技有限公司 JS file processing method and device
CN105468398A (en) * 2014-09-30 2016-04-06 阿里巴巴集团控股有限公司 Module uploading method, request method and loading method for cross-terminal architecture
CN105512324A (en) * 2015-12-21 2016-04-20 用友网络科技股份有限公司 Front end module loader for partial renewal of package file
US20160182605A1 (en) * 2014-12-19 2016-06-23 Johnson Wong Dynamic Content Aggregation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987851A (en) * 2005-12-22 2007-06-27 腾讯科技(深圳)有限公司 Updating display method for webpage data
CN102081633A (en) * 2009-11-27 2011-06-01 阿里巴巴集团控股有限公司 JavaScript file management method, device and system
CN105468398A (en) * 2014-09-30 2016-04-06 阿里巴巴集团控股有限公司 Module uploading method, request method and loading method for cross-terminal architecture
CN104484383A (en) * 2014-12-10 2015-04-01 北京国双科技有限公司 JS file processing method and device
US20160182605A1 (en) * 2014-12-19 2016-06-23 Johnson Wong Dynamic Content Aggregation
CN105512324A (en) * 2015-12-21 2016-04-20 用友网络科技股份有限公司 Front end module loader for partial renewal of package file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陶国荣: "《Backbone.js实战》", 30 April 2014, 机械工业出版社 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145236A (en) * 2017-06-28 2019-01-04 艺龙网信息技术(北京)有限公司 Page file processing method, apparatus and system

Similar Documents

Publication Publication Date Title
Hotez Anti-science extremism in America: escalating and globalizing
Villata et al. The radio delay of the exceptional 3C 454.3 outburst-Follow-up WEBT observations in 2005–2006
MX2020010029A (en) Updateable smart contracts.
CN106354873B (en) Webpage loading method, device and system
CN110020329B (en) Method, device and system for generating webpage
CN106469047A (en) A kind of list implementation method and device
Ginev et al. The LATEXML daemon: Editable math on the collaborative web
CN104951556A (en) Method and device for generating prompt message in search result page
López-Sánchez et al. Massive star formation in Wolf-Rayet galaxies-I. Optical and NIR photometric results
CN106293855A (en) The loading method of dependent file
CN106354731A (en) Document inspection method and device
CN110895481A (en) Rendering method, device and system of desktop application
CN111046640A (en) Dynamic generation method and device of certification document
CN107146245B (en) Image matching method and device
US20150178300A1 (en) Methods for converting an xml artifact into a topic map instance and devices thereof
CN105893608A (en) Page jump method based on Bootstrap and page jump device based on Bootstrap
CN106844656A (en) A kind of page adaptation method and system
CN102722315A (en) Method and device for displaying prompt box of mobile terminal
Mészárosová et al. Separation of drifting pulsating structures in a complex radio spectrum of the 2001 April 11 event
EP4318273A3 (en) Method and system providing contextual functionality in static web pages
Zuccarello et al. A C-level flare observed in an arch filament system: reconnection between pre-existing and emerging field lines?
CN113885996A (en) User interface generation method and device
CN106021434A (en) Video poster display processing method and apparatus
US9710263B2 (en) Understanding computer code with human language assistance
CN105068832A (en) Method and apparatus for generating executable file

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 201203 Shanghai City, Pudong New Area Chinese (Shanghai) free trade zone 498 GuoShouJing Road No. 14 building block 22301-985

Applicant after: Shanghai chuangkin Mdt InfoTech Ltd

Address before: Shanghai City, Pudong New Area Jing Road 201203 Shanghai Free Trade Zone No. 498 building 14 block 22301-985

Applicant before: Upper SeaBird scape computer system company limited

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20170104

RJ01 Rejection of invention patent application after publication