CN107102872A - The loading method and device in JavaScript storehouses - Google Patents

The loading method and device in JavaScript storehouses Download PDF

Info

Publication number
CN107102872A
CN107102872A CN201710204017.2A CN201710204017A CN107102872A CN 107102872 A CN107102872 A CN 107102872A CN 201710204017 A CN201710204017 A CN 201710204017A CN 107102872 A CN107102872 A CN 107102872A
Authority
CN
China
Prior art keywords
javascript
javascript storehouses
storehouses
browser
built
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
CN201710204017.2A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710204017.2A priority Critical patent/CN107102872A/en
Publication of CN107102872A publication Critical patent/CN107102872A/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

Abstract

The disclosure is directed to a kind of loading method and device in JavaScript storehouses, this method includes:Obtain the identification information in JavaScript storehouses to be loaded;When currently used browser supports built-in JavaScript storehouses, JavaScript storehouses corresponding to the identification information is obtained in the JavaScript storehouses built in the browser.The technical scheme can reduce download expense of the browser to JavaScript storehouses, save the flow of user.

Description

The loading method and device in JavaScript storehouses
Technical field
This disclosure relates to field of computer technology, more particularly to JavaScript storehouses loading method and device.
Background technology
JavaScript code is the program in machine code by formula script JavaScript codings of literal translating, will be multiple JavaScript code is brought together, and forms JavaScript storehouses.Current most Website front-end is all with well-known JavaScript carrys out in storehouse auxiliary development, therefore, and user is accomplished by downloading these when loading the webpage of the website using browser The corresponding function of the webpage is realized in JavaScript storehouses.
The content of the invention
The embodiment of the present disclosure provides the loading method and device in JavaScript storehouses.The technical scheme is as follows:
According to the first aspect of the embodiment of the present disclosure there is provided a kind of loading method in JavaScript storehouses, including:
Obtain the identification information in JavaScript storehouses to be loaded;
When currently used browser supports built-in JavaScript storehouses, in the JavaScript built in the browser JavaScript storehouses corresponding to the identification information is obtained in storehouse;
Load JavaScript storehouses corresponding to the identification information.
The technical scheme provided by this disclosed embodiment can include the following benefits:The present embodiment can be in browser Built-in JavaScript storehouses, so just can be when obtaining the identification information in JavaScript storehouses to be loaded, out of browser JavaScript storehouses corresponding to the identification information is obtained in the JavaScript storehouses put;And then it is corresponding to load the identification information JavaScript storehouses, it is not necessary to the JavaScript storehouses are downloaded from network, reduce download of the browser to JavaScript storehouses Expense, saves the flow of user.
In one embodiment, the download in the JavaScript storehouses to be loaded is carried in the identification information Location, methods described also includes:
When the browser does not support built-in JavaScript storehouses, according under the JavaScript storehouses to be loaded Set address downloads corresponding JavaScript storehouses.
The technical scheme provided by this disclosed embodiment can include the following benefits:The present embodiment can be in browser When not supporting built-in JavaScript storehouses, under the download address according to the JavaScript storehouses to be loaded carried in identification information Carry corresponding JavaScript storehouses to load the JavaScript storehouses, and then realize the corresponding function of webpage, it is ensured that be various to browse Device can realize the loading JavaScript storehouses.
In one embodiment, the download in the JavaScript storehouses to be loaded is carried in the identification information Location, methods described also includes:
The mark is not got in the JavaScript storehouses built in browser corresponding described to be loaded During JavaScript storehouses, corresponding JavaScript storehouses are downloaded according to the download address in the JavaScript storehouses to be loaded.
The technical scheme provided by this disclosed embodiment can include the following benefits:The present embodiment can be in browser It is to be added according to what is carried in identification information when not including the corresponding JavaScript storehouses of the mark in built-in JavaScript storehouses The download address in the JavaScript storehouses of load downloads corresponding JavaScript storehouses to load the JavaScript storehouses, and then realizes The corresponding function of webpage.
In one embodiment, methods described also includes:
Obtain the history utilization rate in each JavaScript storehouses;
The JavaScript storehouses that the history utilization rate exceedes predetermined threshold value are built in the browser.
The technical scheme provided by this disclosed embodiment can include the following benefits:The present embodiment can make history The JavaScript storehouses for exceeding predetermined threshold value with rate are built in browser, so ensure that what most of needs were loaded JavaScript storehouses are built into browser, it is not necessary to downloaded, and browser pair so can be just reduced to greatest extent The download expense in JavaScript storehouses, farthest saves the flow of user.
In one embodiment, the currently used browser supports built-in JavaScript storehouses, including:
The currently used browser supports library name lib-name and storehouse version the lib-version category of script labels Property when, determine that the currently used browser supports built-in JavaScript storehouses.
The technical scheme provided by this disclosed embodiment can include the following benefits:The present embodiment can be according to current The browser used supports that the library name lib-name and storehouse version lib-version attributes of script labels are currently used to determine Browser support built-in JavaScript storehouses, determination mode is simply easily realized.
According to the second aspect of the embodiment of the present disclosure there is provided a kind of loading device in JavaScript storehouses, including:
First acquisition module, the identification information in the JavaScript storehouse to be loaded for obtaining;
Second acquisition module, for when currently used browser supports built-in JavaScript storehouses, being browsed described JavaScript storehouses corresponding to the identification information is obtained in JavaScript storehouses built in device;
Load-on module, the JavaScript storehouse corresponding for loading the identification information.
In one embodiment, the download in the JavaScript storehouses to be loaded is carried in the identification information Location, described device also includes:
First download module, for when the browser does not support built-in JavaScript storehouses, according to described to be loaded The download address in JavaScript storehouses download corresponding JavaScript storehouses.
In one embodiment, the download in the JavaScript storehouses to be loaded is carried in the identification information Location, described device also includes:
Second download module, for not getting the corresponding institute of the mark in the JavaScript storehouses built in browser When stating JavaScript storehouses to be loaded, downloaded according to the download address in the JavaScript storehouses to be loaded corresponding JavaScript storehouses.
In one embodiment, described device also includes:
3rd acquisition module, the history utilization rate for obtaining each JavaScript storehouses;
Built-in module, described browse is built in for the history utilization rate to be exceeded to the JavaScript storehouses of predetermined threshold value In device.
In one embodiment, second acquisition module includes:
Determination sub-module, the library name lib-name and storehouse version of script labels are supported for the currently used browser During this lib-version attributes, determine that the currently used browser supports built-in JavaScript storehouses.
According to the third aspect of the embodiment of the present disclosure there is provided a kind of loading device in JavaScript storehouses, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Obtain the identification information in JavaScript storehouses to be loaded;
When currently used browser supports built-in JavaScript storehouses, in the JavaScript built in the browser JavaScript storehouses corresponding to the identification information is obtained in storehouse;
Load JavaScript storehouses corresponding to the identification information.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the disclosure Example, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is a kind of flow chart of the loading method in JavaScript storehouses according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of the loading method in JavaScript storehouses according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of the loading method in JavaScript storehouses according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of the loading device in JavaScript storehouses according to an exemplary embodiment.
Fig. 5 is a kind of block diagram of the loading device in JavaScript storehouses according to an exemplary embodiment.
Fig. 6 is a kind of block diagram of the loading device in JavaScript storehouses according to an exemplary embodiment.
Fig. 7 is a kind of block diagram of the loading device in JavaScript storehouses according to an exemplary embodiment.
Fig. 8 is a kind of block diagram of the loading device in JavaScript storehouses according to an exemplary embodiment.
Fig. 9 is a kind of block diagram of the loading device in JavaScript storehouses according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
In order to reduce download expense of the browser to JavaScript storehouses, the present embodiment can be built in browser JavaScript storehouses, in this way, the identification information in JavaScript storehouses to be loaded can be obtained, and then directly from built in browser JavaScript storehouses in obtain JavaScript storehouses corresponding to the identification information, without download, save user flow.
Fig. 1 is a kind of flow chart of the loading method in JavaScript storehouses according to an exemplary embodiment, such as Fig. 1 Shown, the method for down loading in the JavaScript storehouses is used in the equipment such as terminal, comprises the following steps 101 to 103:
In a step 101, the identification information in JavaScript storehouses to be loaded is obtained.
In a step 102, when currently used browser supports built-in JavaScript storehouses, built in the browser JavaScript storehouses in obtain JavaScript storehouses corresponding to the identification information.
In step 103, JavaScript storehouses corresponding to the identification information is loaded.
In one embodiment, Development of Web Browser business can develop a browser, and the browser is built-in with JavaScript storehouses, In this way, user using the client for the browser being arranged in terminal when entering certain webpage, the client meeting of the browser Sent according to URL (Uniform Resource Locator, the URL) addresses of the webpage to the corresponding Website server of the webpage Request, asks the website to return to the corresponding data message of the webpage, the client of the browser gets the corresponding number of the webpage It is believed that after breath, it is that user shows the webpage on the browser that can load the corresponding content of the data message;Now, website is sent Just include the identification information in JavaScript storehouses to be loaded in the data message come over, this would indicate that the client of the browser Load JavaScript storehouses corresponding to the identification information.If currently used browser is built-in to support in terminal During the browser in JavaScript storehouses, the client of the browser just can be directly from the JavaScript storehouses built in the browser It is middle to obtain JavaScript storehouses corresponding to the identification information, JavaScript storehouses corresponding to the identification information is loaded directly into, and then Show the corresponding function in JavaScript storehouses in the webpage for user.
The present embodiment so just can obtain to be loaded in JavaScript storehouses built in browser During the identification information in JavaScript storehouses, the identification information is obtained from the JavaScript storehouses built in browser corresponding JavaScript storehouses;And then load JavaScript storehouses corresponding to the identification information, it is not necessary to being downloaded from network should JavaScript storehouses, reduce download expense of the browser to JavaScript storehouses, save the flow of user.
In a kind of possible embodiment, the JavaScript storehouses to be loaded are carried in the identification information Download address, the loading method in above-mentioned JavaScript storehouses can also include step A1.
In step A1, when the browser does not support built-in JavaScript storehouses, according to described to be loaded The download address in JavaScript storehouses downloads corresponding JavaScript storehouses.
In one embodiment, the currently used browser of terminal does not support built-in JavaScript storehouses, the i.e. browser not to have There are built-in JavaScript storehouses, and the mark that the data message that website is sended over includes JavaScript storehouses to be loaded is believed Breath, when indicating that browser client will load JavaScript storehouses corresponding to the identification information, will be carried in the identification information The download address in JavaScript storehouses to be loaded, now, browser client can be according to the JavaScript to be loaded The download address in storehouse downloads corresponding JavaScript storehouses, then loads the JavaScript storehouses of the download, and then be user's exhibition Existing corresponding function in JavaScript storehouses in the webpage.
It is to be added according to what is carried in identification information when the present embodiment can not support built-in JavaScript storehouses in browser The download address in the JavaScript storehouses of load downloads corresponding JavaScript storehouses to load the JavaScript storehouses, and then realizes The corresponding function of webpage, it is ensured that various browsers can realize the loading JavaScript storehouses.
In a kind of possible embodiment, the JavaScript storehouses to be loaded are carried in the identification information Download address, the loading method in above-mentioned JavaScript storehouses can also include step B1.
In step bl is determined., the mark is not got in the JavaScript storehouses built in browser corresponding described to be added During the JavaScript storehouses of load, corresponding JavaScript is downloaded according to the download address in the JavaScript storehouses to be loaded Storehouse.
In one embodiment, currently used browser supports built-in JavaScript storehouses, still, it is contemplated that browser visitor The storage size at family end, the impossible built-in all JavaScript storehouses of browser, therefore may occur browser client The situation in the JavaScript storehouse corresponding less than the identification information is searched in the JavaScript storehouses built in browser, now, Because the data message that website is sended over includes taking in the identification information in JavaScript storehouses to be loaded, the identification information Download address with JavaScript storehouses to be loaded, therefore browser client just can be to be loaded according to this The download address in JavaScript storehouses downloads corresponding JavaScript storehouses, then loads the JavaScript storehouses of the download, enters And be that user shows the corresponding function in JavaScript storehouses in the webpage.
The present embodiment can not include the corresponding JavaScript of the mark in the JavaScript storehouses built in browser During storehouse, corresponding JavaScript storehouses are downloaded according to the download address in the JavaScript storehouses to be loaded carried in identification information To load the JavaScript storehouses, and then realize the corresponding function of webpage.
In a kind of possible embodiment, the loading method in above-mentioned JavaScript storehouses can also include step C1 and C2。
In step C1, the history utilization rate in each JavaScript storehouses is obtained.
In step C2, the JavaScript storehouses that the history utilization rate exceedes predetermined threshold value are built in the browser It is interior.
In one embodiment, currently used browser supports built-in JavaScript storehouses, still, it is contemplated that browser visitor The storage size at family end, the impossible built-in all JavaScript storehouses of browser, therefore can select several conventional JavaScript storehouses come built-in, and now, browser client can obtain the history utilization rate in each JavaScript storehouses, then will The JavaScript storehouses that history utilization rate exceedes predetermined threshold value are built in the browser, this way it is secured that most of The JavaScript storehouses of loading are needed to be built into browser, it is not necessary to download, so can just reduce to greatest extent clear Look at download expense of the device to JavaScript storehouses, farthest save the flow of user.
Need exist for explanation, browser client can periodically according to the history utilization rate in each JavaScript storehouses, Update the JavaScript storehouses built in browser, it is ensured that the JavaScript storehouses built in browser are all currently used rate highests JavaScript storehouses.
The JavaScript storehouses that history utilization rate exceedes predetermined threshold value can be built in browser by the present embodiment, so Ensure that most of JavaScript storehouses for needing to load are built into browser, it is not necessary to download, so just can be with Download expense of the browser to JavaScript storehouses is reduced to greatest extent, farthest saves the flow of user.
In a kind of possible embodiment, currently used browser branch in the loading method in above-mentioned JavaScript storehouses Hold built-in JavaScript storehouses and can be implemented as following steps D1.
In step D1, the currently used browser supports the library name lib-name and storehouse version of script labels During lib-version attributes, determine that the currently used browser supports built-in JavaScript storehouses.
In one embodiment, terminal judges whether currently used browser supports built-in JavaScript storehouses to realize The library name lib-name and storehouse version lib-version attributes of script labels whether are supported for currently used browser.
Here, by JavaScript storehouses to be loaded be jquery_1.8.0.js exemplified by illustrate, website can to The corresponding data message for the webpage that browser client is sent is carrying in HTML<script>Label, should<script>Label For the identification information in JavaScript storehouses to be loaded, the browser that can set JavaScript storehouses built in supporting is exactly to support <script>Lib-name (library name) and lib-version (storehouse version) attribute of label, now, what website was sent<script> Label can just be write as<Script src="/js/jquery_1.8.0.js " lib-name=" jQuery " lib-version =" 1.8.0 "></script>, so, when currently used browser does not support lib-name and lib-version attributes, It is assured that the browser does not support built-in JavaScript storehouses, now the browser client ignores that the two belong to Property, it is the download address in JavaScript storehouses to be loaded according to script src="/js/jquery_1.8.0.js, downloads Jquery_1.8.0.js conducts<script>Content revealing;When currently used browser supports lib-name and lib- During version attributes, it is possible to determine that the browser supports built-in JavaScript storehouses, now the browser client will be straight Connect and obtain lib-name=jQuery from the JavaScript storehouses built in browser, lib-version=1.8.0's JavaScript storehouses are jquery_1.8.0.js, if not obtaining lib-name=from the JavaScript storehouses built in browser JQuery, lib-version=1.8.0 JavaScript storehouses, then the browser client just can be according to script src ="/js/jquery_1.8.0.js is the download address in JavaScript storehouses to be loaded, downloads jquery_1.8.0.js and makees For<script>Content revealing.
The present embodiment can support the library name lib-name and storehouse version of script labels according to currently used browser Lib-version attributes determine that currently used browser supports built-in JavaScript storehouses, and determination mode is simply easily realized.
Implementation process is discussed in detail below by several embodiments.
Fig. 2 is a kind of flow chart of the loading method in JavaScript storehouses according to an exemplary embodiment, such as Fig. 2 Shown, this method can be realized by equipment such as terminals, including step 201 is to 206.
In step 201, obtain and carried in the identification information in JavaScript storehouses to be loaded, the identification information State the download address in JavaScript storehouses to be loaded.
In step 202., the library name lib-name and storehouse version of script labels are supported in the currently used browser During this lib-version attributes, determine that currently used browser supports built-in JavaScript storehouses.
In step 203, when currently used browser supports built-in JavaScript storehouses, built in the browser JavaScript storehouses in obtain JavaScript storehouses corresponding to the identification information.
In step 204, do not get that the mark is corresponding described to be treated in the JavaScript storehouses built in browser During the JavaScript storehouses of loading, downloaded according to the download address in the JavaScript storehouses to be loaded corresponding JavaScript storehouses.
In step 205, when the browser does not support built-in JavaScript storehouses, according to described to be loaded The download address in JavaScript storehouses downloads corresponding JavaScript storehouses.
In step 206, JavaScript storehouses corresponding to the identification information is loaded.
Fig. 3 is a kind of flow chart of the loading method in JavaScript storehouses according to an exemplary embodiment, such as Fig. 3 Shown, this method can be realized by equipment such as terminals, including step 301 is to 305.
In step 301, the history utilization rate in each JavaScript storehouses is obtained.
In step 302, the JavaScript storehouses that the history utilization rate exceedes predetermined threshold value are built in described browse In device.
In step 303, the identification information in JavaScript storehouses to be loaded is obtained.
In step 304, when currently used browser supports built-in JavaScript storehouses, built in the browser JavaScript storehouses in obtain JavaScript storehouses corresponding to the identification information.
In step 305, JavaScript storehouses corresponding to the identification information is loaded.
Following is disclosure device embodiment, can be used for performing method of disclosure embodiment.
Fig. 4 is a kind of block diagram of the loading device in JavaScript storehouses according to an exemplary embodiment, the device Can by software, hardware or both be implemented in combination with it is some or all of as electronic equipment.As shown in figure 4, should The loading device in JavaScript storehouses includes:First acquisition module 401, the second acquisition module 402 and load-on module 403;Wherein:
First acquisition module 401, the identification information in the JavaScript storehouse to be loaded for obtaining;
Second acquisition module 402, for when currently used browser supports built-in JavaScript storehouses, described clear Look in the JavaScript storehouses built in device and obtain JavaScript storehouses corresponding to the identification information;
Load-on module 403, the JavaScript storehouse corresponding for loading the identification information.
As a kind of possible embodiment, carried in the identification information under the JavaScript storehouses to be loaded Set address, the loading device in JavaScript storehouses disclosed above can be configured to include the first download module 404, Fig. 5 It is the block diagram for the loading device for being related to above-mentioned JavaScript storehouses, wherein:
First download module 404, for when the browser does not support built-in JavaScript storehouses, according to described to be added The download address in the JavaScript storehouses of load downloads corresponding JavaScript storehouses.
As a kind of possible embodiment, carried in the identification information under the JavaScript storehouses to be loaded Set address, the loading device in JavaScript storehouses disclosed above can be configured to include the second download module 405, Fig. 6 It is the block diagram for the loading device for being related to above-mentioned JavaScript storehouses, wherein:
Second download module 405, for not getting the mark correspondence in the JavaScript storehouses built in browser The JavaScript storehouses to be loaded when, downloaded according to the download address in the JavaScript storehouses to be loaded corresponding JavaScript storehouses.
As a kind of possible embodiment, the loading device in JavaScript storehouses disclosed above can be configured to bag The 3rd acquisition module 406 and built-in module 407 are included, Fig. 7 is the block diagram for the loading device for being related to above-mentioned JavaScript storehouses, its In:
3rd acquisition module 406, the history utilization rate for obtaining each JavaScript storehouses.
Built-in module 407, it is described for the history utilization rate to be built in more than the JavaScript storehouses of predetermined threshold value In browser.
As a kind of possible embodiment, the loading device in JavaScript storehouses disclosed above can also be obtained second Module 402 is configured to include determination sub-module 4021, and Fig. 8 is the block diagram for the loading device for being related to above-mentioned JavaScript storehouses, its In:
Determination sub-module 4021, for the currently used browser support script labels library name lib-name and During the version lib-version attributes of storehouse, determine that the currently used browser supports built-in JavaScript storehouses.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 9 is a kind of block diagram of the loading device in JavaScript storehouses according to an exemplary embodiment, the device Suitable for terminal device.For example, device 900 can be mobile phone, game console, computer, tablet device, individual digital is helped Reason etc..
Device 900 can include following one or more assemblies:Processing assembly 901, memory 902, power supply module 903, Multimedia groupware 904, audio-frequency assembly 905, input/output (I/O) interface 906, sensor cluster 907, and communication component 908。
The integrated operation of the usual control device 900 of processing assembly 901, such as with display, call, data communication, phase Machine operates the operation associated with record operation.Processing assembly 901 can refer to including one or more processors 920 to perform Order, to complete all or part of step of above-mentioned method.In addition, processing assembly 901 can include one or more modules, just Interaction between processing assembly 901 and other assemblies.For example, processing assembly 901 can include multi-media module, it is many to facilitate Interaction between media component 904 and processing assembly 901.
Memory 902 is configured as storing various types of data supporting the operation in device 900.These data are shown Example includes the instruction of any application program or method for being operated on device 900, and contact data, telephone book data disappears Breath, picture, video etc..Memory 902 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM) is erasable to compile Journey read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 903 provides electric power for the various assemblies of device 900.Power supply module 903 can include power management system System, one or more power supplys, and other components associated with generating, managing and distributing electric power for device 900.
Multimedia groupware 904 is included in the screen of one output interface of offer between described device 900 and user.One In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch-screen, to receive the input signal from user.Touch panel includes one or more touch sensings Device is with the gesture on sensing touch, slip and touch panel.The touch sensor can not only sensing touch or sliding action Border, but also detection touches or slide related duration and pressure with described.In certain embodiments, many matchmakers Body component 904 includes a front camera and/or rear camera.When device 900 be in operator scheme, such as screening-mode or During video mode, front camera and/or rear camera can receive the multi-medium data of outside.Each front camera and Rear camera can be a fixed optical lens system or with focusing and optical zoom capabilities.
Audio-frequency assembly 905 is configured as output and/or input audio signal.For example, audio-frequency assembly 905 includes a Mike Wind (MIC), when device 900 be in operator scheme, when such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The audio signal received can be further stored in memory 902 or via communication set Part 908 is sent.In certain embodiments, audio-frequency assembly 905 also includes a loudspeaker, for exports audio signal.
I/O interface 906 is that interface, above-mentioned peripheral interface module are provided between processing assembly 901 and peripheral interface module Can be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and Locking press button.
Sensor cluster 907 includes one or more sensors, and the state for providing various aspects for device 900 is commented Estimate.For example, sensor cluster 907 can detect opening/closed mode of device 900, the relative positioning of component is for example described Component is the display and keypad of device 900, and sensor cluster 907 can be with 900 1 components of detection means 900 or device Position change, the existence or non-existence that user contacts with device 900, the orientation of device 900 or acceleration/deceleration and device 900 Temperature change.Sensor cluster 907 can include proximity transducer, be configured to detect in not any physical contact The presence of neighbouring object.Sensor cluster 907 can also include optical sensor, such as CMOS or ccd image sensor, for into As being used in application.In certain embodiments, the sensor cluster 907 can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 908 is configured to facilitate the communication of wired or wireless way between device 900 and other equipment.Device 900 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.In an exemplary implementation In example, communication component 908 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 908 also includes near-field communication (NFC) module, to promote junction service.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 900 can be believed by one or more application specific integrated circuits (ASIC), numeral Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 902 of instruction, above-mentioned instruction can be performed to complete the above method by the processor 920 of device 900.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
The non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processor of device 900 During execution so that device 900 is able to carry out the loading method in above-mentioned JavaScript storehouses, methods described includes:
Obtain the identification information in JavaScript storehouses to be loaded;
When currently used browser supports built-in JavaScript storehouses, in the JavaScript built in the browser JavaScript storehouses corresponding to the identification information is obtained in storehouse;
Load JavaScript storehouses corresponding to the identification information.
Instruction in the storage medium can also include:
The download address in the JavaScript storehouses to be loaded is carried in the identification information, methods described is also wrapped Include:
When the browser does not support built-in JavaScript storehouses, according under the JavaScript storehouses to be loaded Set address downloads corresponding JavaScript storehouses.
Instruction in the storage medium can also include:
The download address in the JavaScript storehouses to be loaded is carried in the identification information, methods described is also wrapped Include:
The mark is not got in the JavaScript storehouses built in browser corresponding described to be loaded During JavaScript storehouses, corresponding JavaScript storehouses are downloaded according to the download address in the JavaScript storehouses to be loaded.
Instruction in the storage medium can also include:
Methods described also includes:
Obtain the history utilization rate in each JavaScript storehouses;
The JavaScript storehouses that the history utilization rate exceedes predetermined threshold value are built in the browser.
Instruction in the storage medium can also include:
The currently used browser supports built-in JavaScript storehouses, including:
The currently used browser supports library name lib-name and storehouse version the lib-version category of script labels Property when, determine that the currently used browser supports built-in JavaScript storehouses.
A kind of loading device in JavaScript storehouses, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Obtain the identification information in JavaScript storehouses to be loaded;
When currently used browser supports built-in JavaScript storehouses, in the JavaScript built in the browser JavaScript storehouses corresponding to the identification information is obtained in storehouse;
Load JavaScript storehouses corresponding to the identification information.
The processor can be additionally configured to:
Obtain the identification information in JavaScript storehouses to be loaded;
When currently used browser supports built-in JavaScript storehouses, in the JavaScript built in the browser JavaScript storehouses corresponding to the identification information is obtained in storehouse;
Load JavaScript storehouses corresponding to the identification information.
The processor can be additionally configured to:
The download address in the JavaScript storehouses to be loaded is carried in the identification information, methods described is also wrapped Include:
When the browser does not support built-in JavaScript storehouses, according under the JavaScript storehouses to be loaded Set address downloads corresponding JavaScript storehouses.
The processor can be additionally configured to:
The download address in the JavaScript storehouses to be loaded is carried in the identification information, methods described is also wrapped Include:
The mark is not got in the JavaScript storehouses built in browser corresponding described to be loaded During JavaScript storehouses, corresponding JavaScript storehouses are downloaded according to the download address in the JavaScript storehouses to be loaded.
The processor can be additionally configured to:
Methods described also includes:
Obtain the history utilization rate in each JavaScript storehouses;
The JavaScript storehouses that the history utilization rate exceedes predetermined threshold value are built in the browser.
The processor can be additionally configured to:
The currently used browser supports built-in JavaScript storehouses, including:
The currently used browser supports library name lib-name and storehouse version the lib-version category of script labels Property when, determine that the currently used browser supports built-in JavaScript storehouses.
Those skilled in the art will readily occur to its of the disclosure after considering specification and putting into practice disclosure disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the precision architecture that the disclosure is not limited to be described above and is shown in the drawings, and And various modifications and changes can be being carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (11)

1. a kind of loading method in JavaScript storehouses, it is characterised in that including:
Obtain the identification information in JavaScript storehouses to be loaded;
When currently used browser supports built-in JavaScript storehouses, in the JavaScript storehouses built in the browser Obtain JavaScript storehouses corresponding to the identification information;
Load JavaScript storehouses corresponding to the identification information.
2. according to the method described in claim 1, it is characterised in that carried in the identification information described to be loaded The download address in JavaScript storehouses, methods described also includes:
When the browser does not support built-in JavaScript storehouses, according to the download in the JavaScript storehouses to be loaded Download corresponding JavaScript storehouses in location.
3. according to the method described in claim 1, it is characterised in that carried in the identification information described to be loaded The download address in JavaScript storehouses, methods described also includes:
The corresponding JavaScript to be loaded of the mark is not got in the JavaScript storehouses built in browser During storehouse, corresponding JavaScript storehouses are downloaded according to the download address in the JavaScript storehouses to be loaded.
4. according to the method described in claim 1, it is characterised in that methods described also includes:
Obtain the history utilization rate in each JavaScript storehouses;
The JavaScript storehouses that the history utilization rate exceedes predetermined threshold value are built in the browser.
5. method according to claim 1, it is characterised in that the currently used browser supports built-in JavaScript Storehouse, including:
The currently used browser supports the library name lib-name and storehouse version lib-version attributes of script labels When, determine that the currently used browser supports built-in JavaScript storehouses.
6. a kind of loading device in JavaScript storehouses, it is characterised in that including:
First acquisition module, the identification information in the JavaScript storehouse to be loaded for obtaining;
Second acquisition module, for when currently used browser supports built-in JavaScript storehouses, in the browser JavaScript storehouses corresponding to the identification information is obtained in the JavaScript storehouses put;
Load-on module, the JavaScript storehouse corresponding for loading the identification information.
7. device according to claim 6, it is characterised in that carried in the identification information described to be loaded The download address in JavaScript storehouses, described device also includes:
First download module, for when the browser does not support built-in JavaScript storehouses, according to described to be loaded The download address in JavaScript storehouses downloads corresponding JavaScript storehouses.
8. device according to claim 6, it is characterised in that carried in the identification information described to be loaded The download address in JavaScript storehouses, described device also includes:
Second download module, for not got in the JavaScript storehouses built in browser, the mark is corresponding described to be treated During the JavaScript storehouses of loading, downloaded according to the download address in the JavaScript storehouses to be loaded corresponding JavaScript storehouses.
9. device according to claim 6, it is characterised in that described device also includes:
3rd acquisition module, the history utilization rate for obtaining each JavaScript storehouses;
Built-in module, the JavaScript storehouses for the history utilization rate to be exceeded to predetermined threshold value are built in the browser It is interior.
10. device according to claim 6, it is characterised in that second acquisition module includes:
Determination sub-module, the library name lib-name and storehouse version of script labels are supported for the currently used browser During lib-version attributes, determine that the currently used browser supports built-in JavaScript storehouses.
11. a kind of loading device in JavaScript storehouses, it is characterised in that including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Obtain the identification information in JavaScript storehouses to be loaded;
When currently used browser supports built-in JavaScript storehouses, in the JavaScript storehouses built in the browser Obtain JavaScript storehouses corresponding to the identification information;
Load JavaScript storehouses corresponding to the identification information.
CN201710204017.2A 2017-03-30 2017-03-30 The loading method and device in JavaScript storehouses Pending CN107102872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710204017.2A CN107102872A (en) 2017-03-30 2017-03-30 The loading method and device in JavaScript storehouses

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710204017.2A CN107102872A (en) 2017-03-30 2017-03-30 The loading method and device in JavaScript storehouses

Publications (1)

Publication Number Publication Date
CN107102872A true CN107102872A (en) 2017-08-29

Family

ID=59675681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710204017.2A Pending CN107102872A (en) 2017-03-30 2017-03-30 The loading method and device in JavaScript storehouses

Country Status (1)

Country Link
CN (1) CN107102872A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060107217A1 (en) * 1999-10-28 2006-05-18 Qi Lu Method and system of facilitating automatic login to a web site using an internet browser
CN102567516A (en) * 2011-12-28 2012-07-11 华为技术有限公司 Script loading method and device
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060107217A1 (en) * 1999-10-28 2006-05-18 Qi Lu Method and system of facilitating automatic login to a web site using an internet browser
CN102567516A (en) * 2011-12-28 2012-07-11 华为技术有限公司 Script loading method and device
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device

Similar Documents

Publication Publication Date Title
CN107943439B (en) Interface moving method and device, intelligent terminal, server and operating system
CN104159275B (en) Method for connecting network and device
CN107329743A (en) Methods of exhibiting, device and the storage medium of five application page
EP2977893B1 (en) Lightweight app offline updating method, device and terminal
US10642456B2 (en) Application distribution method and device
CN103914523A (en) Page rollback controlling method and page rollback controlling device
CN104050266B (en) User behavior recording method, device and web browser
CN104778405B (en) Ad blocking method and device
CN107193441B (en) Desktop pendant previewing method and device
CN107229711A (en) Webpage display process and device
CN106126685A (en) Page loading method and device
CN106201610A (en) Web application accesses the method and device of the primary function of terminal
CN104991916A (en) Webpage loading method and apparatus
CN107239527A (en) web access method and device
CN105183493A (en) Display method and device of network information
CN105808305A (en) Static resource loading method and device
CN106095455A (en) A kind of application update method and device
CN107483594A (en) The method and apparatus of display renewal entry
CN107220059A (en) The display methods and device of application interface
CN106504295A (en) Render the method and device of picture
CN106708967A (en) Page display method and device
CN104683496A (en) Address filtering method and device
CN105488200A (en) Webpage display method and device
CN107045541A (en) data display method and device
CN106331076A (en) Advertisement push method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170829