CN103902588A - Webpage access method and user terminal - Google Patents
Webpage access method and user terminal Download PDFInfo
- Publication number
- CN103902588A CN103902588A CN201210580440.XA CN201210580440A CN103902588A CN 103902588 A CN103902588 A CN 103902588A CN 201210580440 A CN201210580440 A CN 201210580440A CN 103902588 A CN103902588 A CN 103902588A
- Authority
- CN
- China
- Prior art keywords
- resource file
- allocated resource
- target web
- file
- download
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Abstract
An embodiment of the invention discloses a webpage access method. The webpage access method includes loading a target webpage which does not contain an appointed resource file into a browser; after the target webpage is loaded into the browser, adding the appointed resource file which is acquired in advance in the target webpage; showing the target webpage after the appointed resource file is added. Correspondingly, the embodiment of the invention further discloses a user terminal. By the webpage access method and the user terminal, webpage access speed can be increased.
Description
Technical field
The present invention relates to Internet technical field, relate in particular to a kind of Web access method and user terminal.
Background technology
Mix application program (Application, APP) be embedded with browser, mixing the access speed for acceleration of web page in the performance history of APP, mix APP and can be provided with cache policy, this cache policy is for downloading the resource file of having accessed, for example: conventional CSS (cascading style sheet) (Cascading Style Sheet, CSS) file, JavaScript file (this file is file general in computer realm, there is no the concrete Chinese meaning) or picture file etc.Terminal can be carried out the above-mentioned resource file of this cache policy buffer memory, to open fast the webpage at these resource file places.
The quantity of the resource file of above-mentioned buffer memory is very large in actual applications, and the memory buffers space that above-mentioned resource file takies is also very large.And terminal buffers space is all fewer at present, therefore spatial cache just easily occurs that buffer memory is seriously not enough, will delete the resource file of part of cache; In the time again opening the webpage at resource file place of deletion, just need to again download the resource file of deletion, cause like this speed of web page access very slow.
Summary of the invention
The embodiment of the present invention provides a kind of Web access method and user terminal, can improve the speed of web page access.
In order to solve the problems of the technologies described above, a kind of Web access method that the embodiment of the present invention provides, comprising:
Load the target web that does not comprise allocated resource file to browser;
After described target web is loaded in described browser, in described target web, add the described allocated resource file obtaining in advance;
Represent the target web adding after described allocated resource file.
The embodiment of the present invention also provides a kind of user terminal, comprising: loading unit, adding device and represent unit, wherein:
Described loading unit, for loading the target web that does not comprise allocated resource file to browser;
Described adding device at described loading unit, described target web being loaded on after described browser, adds the described allocated resource file obtaining in advance in described target web;
The described unit that represents, adds the target web after described allocated resource file for representing described adding device.
In technique scheme, load the target web that does not comprise allocated resource file to browser; After described target web is loaded in described browser, in described target web, add the described allocated resource file obtaining in advance; Represent the target web adding after described allocated resource file.Due in loading procedure without loading allocated resource file, but the allocated resource file obtaining is in advance added in the webpage after loading, so just can improve the speed of web page access.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic flow sheet of a kind of Web access method of providing of the embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the another kind of Web access method that provides of the embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the another kind of Web access method that provides of the embodiment of the present invention
Fig. 4 is the structural representation of a kind of user terminal of providing of the embodiment of the present invention;
Fig. 5 is the structural representation of the another kind of user terminal that provides of the embodiment of the present invention;
Fig. 6 is the structural representation of the another kind of user terminal that provides of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the schematic flow sheet of a kind of Web access method of providing of the embodiment of the present invention, as shown in Figure 1, comprising:
101, load the target web that does not comprise allocated resource file to browser.
Optionally, before loading above-mentioned target web, the server at above-mentioned target web place just removes the quoting resource label of above-mentioned allocated resource file from the webpage source code of objective network, and when loaded targets webpage, the target web of loading does not just comprise above-mentioned allocated resource file like this.Due in loading procedure without loading above-mentioned allocated resource file, the speed of Web page loading is just very fast like this, the speed of web page access is very fast.
102,, after described target web is loaded in described browser, in described target web, add the described allocated resource file obtaining in advance.
Optionally, the above-mentioned allocated resource file obtaining in advance can be the allocated resource file of downloading in advance and preserving.Wherein, above-mentioned allocated resource file can be that server is for example, with terminal (: computing machine, the mobile terminal) prearrange of realizing this method good, quantity in target web is very large, and the storage space taking also very large resource file be defined as allocated resource file.
103, represent the target web adding after described allocated resource file.
In technique scheme, load the target web that does not comprise allocated resource file to browser; After described target web is loaded in described browser, in described target web, add the described allocated resource file obtaining in advance; Represent the target web adding after described allocated resource file.Due in loading procedure without loading allocated resource file, but the allocated resource file obtaining is in advance added in the webpage after loading, so just can improve the speed of web page access.
Fig. 2 is the schematic flow sheet of the another kind of Web access method that provides of the embodiment of the present invention, as shown in Figure 2, comprising:
201, be provided for downloading the download policy of allocated resource file, described allocated resource file is corresponding with target web.
Optionally, above-mentioned allocated resource file is corresponding with target web to be referred to, above-mentioned allocated resource file is the resource file that need to add in target web.
Optionally, above-mentioned download policy can comprise:
The download path information of above-mentioned specified file and/or the file name information of above-mentioned specified file.
Above-mentioned fileinfo can be file identification.
Optionally, above-mentioned specified file can be one or more file, and above-mentioned download policy can comprise:
The download path information of each file in above-mentioned specified file, and the file identification of the file of each download path download, i.e. the file of each download has mark, to prevent that file identification from repeating, avoids in subsequent processes, occurs adding wrong file.
Optionally, above-mentioned download policy, except above-mentioned allocated resource file is downloaded in indication, can also be downloaded other resource file, wherein, above-mentioned allocated resource file can be the resource file that target web is corresponding, and above-mentioned other resource file can be the resource file that other webpage is corresponding.This download policy can be supported multiple webpages.
It should be noted that, in embodiments of the present invention, before loaded targets webpage, which file the allocated resource file corresponding with regard to understand target webpage is, in subsequent treatment, selects allocated resource file again from the resource file of preserving.
202, download described allocated resource file according to described download policy.
203, preserve the allocated resource file of described download.
As the optional embodiment of one, in the time that above-mentioned target web need to be loaded on the embedded browser that mixes APP, step 201 can comprise:
In the root directory that mixes APP, add the configuration file of the download policy for downloading described allocated resource file.
Optionally, above-mentioned configuration file can comprise: at least one download path and and the file identification of the file downloaded of each download path.
Optionally, above-mentioned configuration file can be the configuration file of cache.xml (be the file layout stipulating in agreement, there is no the concrete Chinese meaning) form, and this configuration file can be as follows:
Wherein, cache.xml is used to specify the download policy of mixing APP.Cache-policy is the root node of cache.xml file; Cache-folder is used to specify download path, this download path can consult in advance with server, the content that download policy is downloaded, and download path occurrence is specified by foldername attribute, if there is no newly-built one, i.e. path in newly-increased download; Cache-file specifies the resource file of downloading, and filename represents resource path, and localname represents to store into local title, to prevent that filename from repeating.
Above-mentioned is only giving an example of an application.Step 202 just can be downloaded " http://xyz.com/a.css ", " http://xyz.com/b.jpg " and " resource file in these paths of http://xyz.com/c.js; also difference called after a, b and c, step 203 is just preserved these files according to above-mentioned download policy.Certain above-mentioned path can also be the download path of different web sites.
204, load the target web that does not comprise allocated resource file to browser.
205,, after described target web is loaded in described browser, in described target web, add the described allocated resource file obtaining in advance.
206, represent the target web adding after described allocated resource file.
As the optional embodiment of one, step 201, step 202 and step 203 can be before access destination webpage, just to carry out for the first time, in the time of back-call target web, just, without again performing step step 201, step 202 and step 203, at this moment directly start to carry out just from step 204.
In the optional embodiment of one, above-mentioned allocated resource file can comprise following at least one:
Style sheet, picture and JavaScript file.
Optionally, style sheet can be CSS.
Optionally, in the time that above-mentioned allocated resource file comprises picture, after step 202, after step 203, described method can also comprise:
Convert the picture of download to text message;
Optionally, can be the text message that the picture of download is converted to Base64 (coded system stipulating in agreement, without the concrete Chinese meaning) form.
Optionally, step 203 can comprise:
Preserve the text message after described conversion.
Optionally, when above-mentioned specified file is except comprising picture, also comprise other resource file, for example: when style sheet and JavaScript file, step 203 can comprise:
Preserve the text message after described conversion, and preserve all resource files of the allocated resource file of downloading except picture.
Due to above-mentioned style sheet, the quantity of picture and JavaScript file is all a lot of in webpage, and the storage space that these resource files take is very large, in prior art, be by the spatial cache of these resource file buffer memorys, take like this and can take a lot of spatial caches, may cause buffer memory not enough, and the present invention downloads these resource files preserve in advance, in the time of webpage corresponding to these resource files of access, just load the webpage that does not comprise these resource files, loading velocity is just very fast like this, after loading, add again resource file from this locality and just can represent so a complete webpage.
For example: initial target web comprises plurality of pictures, but the present invention downloads and is kept at this locality by these pictures in advance, in the time that needs are accessed this target web, server just removes above-mentioned picture in this webpage, when loading, just load and do not comprise the webpage of above-mentioned picture, then in the webpage having loaded, add above-mentioned picture.Like this due to server interaction process in do not need to Load Image, therefore can improve the access speed of webpage.
As the optional embodiment of one, the present invention can be applied to and mix in APP, and above-mentioned target web just can be applied to the webpage mixing on APP, and above-mentioned browser just can mix the embedded browser of APP.User, in the time logining mixing APP for the first time, just can carry out above-mentioned steps 201, step 202 and step 203 this locality is downloaded and be kept to above-mentioned allocated resource file.Meanwhile, server is known user terminal after above-mentioned allocated resource, just can will in webpage corresponding above-mentioned allocated resource file, remove above-mentioned allocated resource file.In the time that user needs access destination webpage, just can start to carry out from step 204, load the target web that does not comprise allocated resource file.
In technique scheme, the step of increased download in the above on the basis of embodiment, preserving allocated resource file, more comprehensive and more kinds of embodiments have been introduced example of the present invention, to realize the speed that improves web page access.
Fig. 3 is the schematic flow sheet of the another kind of Web access method that provides of the embodiment of the present invention, as shown in Figure 3, comprising:
301, load the target web that does not comprise allocated resource file to browser.
302,, after described target web is loaded in described browser, the described allocated resource file obtaining is in advance injected to described target web with the form of character string.
Optionally, can be to be injected in target web with the form of JavaScript string variable, certainly in the invention process including but not limited to above-mentioned injection mode.
Optionally, for example: the present embodiment should be in the time that the UIWebView of iOS platform (being an Apply Names in iOS platform) applies, it (is the form of the character string of agreement regulation that step 302 just can be passed through tringByEvaluatingJavaScriptFromString, without the concrete Chinese meaning) form inject target web, can be specifically the script that injects target web.
303, convert the character string of injecting in described target web to label.
Optionally, after conversion, listening the content of label is exactly the content of above-mentioned allocated resource file.
Optionally, converting the character string of injecting in described target web to label can be to convert the character string of injection to label by what inject in described target web with rule corresponding to allocated resource.Wherein, corresponding rule is to stipulate in agreement, can be as follows:
File suffixes | Html tag |
.css | style |
.js | script |
.jpg/.png/.gif | img(Base64) |
Wherein, the expression style sheet that above-mentioned file suffixes is .css, the character string that step 303 is just injected style sheet is converted to the label of style form; Above-mentioned file suffixes is the expression JavaScript file of .js, and the character string that step 303 is just injected JavaScript file is converted to the label of script form; Above-mentioned file suffixes is the expression picture of .jpg/.png/.gif, and the character string that step 303 is just injected picture is converted to the label of img (Base64) form.Optionally, when converting to after label, just can represent target web.
304, represent the target web after described switch labels.
As the optional embodiment of one, in the time that above-mentioned allocated resource file comprises picture, step 304 can comprise:
Convert the text message after picture conversion to picture, and represent the target web that comprises described picture.
Wherein, the text message that above-mentioned text message can Base64 form, downloads after above-mentioned picture, just converts this picture to text message, and the picture obtaining is in advance preserved with the text of Base64 form.Performing step at 304 o'clock, just can identify the text message (for example: the text message of Base64 form) that picture converts to, then text information is changed into picture, and represent the target web that comprises this picture.
In the optional embodiment of one, after step 301, before step 303, described method also comprises:
Detect above-mentioned allocated resource file and whether be injected in above-mentioned target web, when testing result is yes, time perform step 303;
When testing result is while being no, wait for certain time length, continue to carry out and detect above-mentioned allocated resource file and whether be injected into the step in above-mentioned target web, be yes to testing result.
Optionally, above-mentioned detecting step can be carried out together with step 302, can be also after step 302, before step 303, carries out.
Optionally, the allocated resource file obtaining in advance, is all provided with file identification, in the time that step 302 is injected certain resource file, in the source file of target web, will comprise the variable name of the page of this resource file, this variable name is just the file identification of this resource file.For example, when above-mentioned resource file is resource file corresponding to " http://xyz.com/a.css " path, and when the file identification of this resource file is a.css, in the time that step 302 is injected this resource file to target web, the variable that just comprises variable a.css by name in the source file of target web can be specifically window[' a.css '].When window[' a.css ' being detected] when empty, just represent that this resource file is not also injected into, otherwise, represent that this resource file is injected into.
Optionally, whether above-mentioned detecting step can detect above-mentioned allocated resource file by the script of JavaScript form and be injected in above-mentioned target web.
As the optional embodiment of one, the present embodiment can be realized together in conjunction with above-mentioned second embodiment of the method.
In technique scheme, on the basis of embodiment, the multiple implementation that allocated resource file is injected is elaborated in the above, to realize the speed that improves web page access.
Be apparatus of the present invention embodiment below, apparatus of the present invention embodiment is for carrying out the method for the inventive method embodiment mono-to three realization, for convenience of explanation, only show the part relevant to the embodiment of the present invention, concrete ins and outs do not disclose, and please refer to the embodiment of the present invention one embodiment bis-and implement three.
Fig. 4 is the structural representation of a kind of user terminal of providing of the embodiment of the present invention, as shown in Figure 4, comprising: loading unit 41, adding device 42 and represent unit 43, wherein:
Loading unit 41, for loading the target web that does not comprise allocated resource file to browser.
Optionally, before loading above-mentioned target web, the server at above-mentioned target web place just removes the quoting resource label of above-mentioned allocated resource file from the webpage source code of objective network, and when loaded targets webpage, the target web of loading does not just comprise above-mentioned allocated resource file like this.Due to just very fast without the speed that loads the such Web page loading of above-mentioned allocated resource file in loading procedure, the speed of web page access is very fast.
Adding device 42 at loading unit 41, described target web being loaded on after described browser, adds the described allocated resource file obtaining in advance in described target web.
Optionally, the above-mentioned allocated resource file obtaining in advance can be the allocated resource file of downloading in advance and preserving.Wherein, above-mentioned allocated resource file can be that server and above-mentioned user terminal prearrange are good, and the quantity in target web is very large, and the storage space taking also very large resource file be defined as allocated resource file.
Represent unit 43, add the target web after described allocated resource file for representing adding device 42.
As the optional embodiment of one, above-mentioned user terminal can comprise:
Computing machine, mobile terminal, wherein, mobile terminal can comprise mobile phone, panel computer etc.
In technique scheme, load the target web that does not comprise allocated resource file to browser; After described target web is loaded in described browser, in described target web, add the described allocated resource file obtaining in advance; Represent the target web adding after described allocated resource file.Due in loading procedure without loading allocated resource file, but the allocated resource file obtaining is in advance added in the webpage after loading, so just can improve the speed of web page access.
Fig. 5 is the structural representation of the another kind of user terminal that provides of the embodiment of the present invention, as shown in Figure 5, comprising: setting unit 51, download unit 52, storage unit 53, loading unit 54, adding device 55 and represent unit 56, wherein:
Setting unit 51, for being provided for downloading the download policy of described allocated resource file, described allocated resource file is corresponding with target web.
Optionally, refer to corresponding with target web of above-mentioned allocated resource file, above-mentioned allocated resource file is the resource file that need to add in target web.
Optionally, above-mentioned download policy can comprise:
The download path information of above-mentioned specified file and/or the file name information of above-mentioned specified file.
Above-mentioned fileinfo can be file identification.
Optionally, above-mentioned specified file can be one or more file, and above-mentioned download policy can comprise:
The download path information of each file in above-mentioned specified file, and the file identification of the file of each download path download, i.e. the file of each download has mark, to prevent that file identification from repeating, to avoid in subsequent processes, there is adding wrong file.
Optionally, above-mentioned download policy, except above-mentioned allocated resource file is downloaded in indication, can also be downloaded other resource file, wherein, above-mentioned allocated resource file can be the resource file that target web is corresponding, and above-mentioned other resource file can be the resource file that other webpage is corresponding.This download policy can be supported multiple webpages.
It should be noted that, in embodiments of the present invention, before loaded targets webpage, which file the allocated resource file corresponding with regard to understand target webpage is, in subsequent treatment, selects allocated resource file again from the resource file of preserving.
Adding device 55 for described target web being loaded on after described browser at loading unit 54, adds the described allocated resource file that storage unit 53 is preserved in described target web.
Represent unit 56, add the target web after described allocated resource file for representing adding device 55.
As the optional embodiment of one, in the time that above-mentioned target web need to be loaded on the embedded browser that mixes APP, setting unit 51 can also be used for adding the configuration file of the download policy for downloading described allocated resource file at the root directory that mixes APP.
Optionally, above-mentioned configuration file can comprise: at least one download path and and the file identification of the file downloaded of each download path.
Optionally, above-mentioned configuration file can be the configuration file of cache.xml (be the file layout stipulating in agreement, there is no the concrete Chinese meaning) form, and this configuration file can be as follows:
Wherein, cache.xml is used to specify the download policy of mixing APP.Cache-policy is the root node of cache.xml file; Cache-folder is used to specify download path, this download path can consult in advance with server, the content that download policy is downloaded, and download path occurrence is specified by foldername attribute, if there is no newly-built one, i.e. path in newly-increased download; Cache-file specifies the resource file of downloading, and filename represents resource path, and localname represents to store local title into, prevents that filename from repeating.
Above-mentioned is only giving an example of an application.Just can download " http://xyz.com/a.css ", " http://xyz.com/b.jpg " and " resource file in this path of http://xyz.com/c.js, and difference called after a, b and c according to above-mentioned download policy.Certain above-mentioned path can be the download path of different web sites.
In the optional embodiment of one, above-mentioned allocated resource file can comprise following at least one:
Style sheet, picture and JavaScript file.
Optionally, style sheet can be CSS.
Optionally, in the time that above-mentioned allocated resource file comprises picture, described user terminal can also comprise:
The second converting unit (attached not shown in FIG.), for converting the picture of download to text message;
Optionally, can be the text message that the picture of download is converted to Base64 (coded system stipulating in agreement, without the concrete Chinese meaning) form.
Optionally, storage unit 53 can also be used for preserving the text message after described conversion.
Optionally, when above-mentioned specified file is except comprising picture, also comprise other resource file, for example: when style sheet and JavaScript file, storage unit 53 can also be used for preserving the text message after described conversion, and preserves all resource files of the allocated resource file of downloading except picture.
Due to above-mentioned style sheet, the quantity of picture and JavaScript file is all a lot of in webpage, and the storage space that these resource files take is very large, in prior art, be by the spatial cache of these resource file buffer memorys, take like this and can take a lot of spatial caches, may cause buffer memory not enough, and the present invention downloads these resource files preserve in advance, in the time of webpage corresponding to these resource files of access, just load the webpage that does not comprise these resource files, loading velocity is just very fast like this, after loading, add again resource file from this locality and just can represent so a complete webpage.
As the optional embodiment of one, the present invention can be applied to user terminal and mixing APP is installed above, and above-mentioned target web just can be applied to the webpage mixing on APP, and above-mentioned browser just can mix the embedded browser of APP.
In technique scheme, the step of increased download in the above on the basis of embodiment, preserving allocated resource file, more comprehensive and more kinds of embodiments have been introduced example of the present invention, to realize the speed that improves web page access.
Fig. 6 is the structural representation of the another kind of user terminal that provides of the embodiment of the present invention, as shown in Figure 6, comprising: loading unit 61, adding device 62 and represent unit 63, and wherein, adding device 62 comprises injection unit 621 and the first converting unit 622, wherein:
The first converting unit 622, converts label to for the character string that described target web is injected.
Represent unit 63, for representing the target web after the first converting unit 622 switch labels.
Optionally, injection unit 621 can be to be injected in target web with the form of JavaScript string variable, certainly in the invention process including but not limited to above-mentioned injection mode.
Optionally, for example: the present embodiment should be in the time that the UIWebView of iOS platform (being an Apply Names in iOS platform) applies, it (is the form of the character string of agreement regulation that injection unit 621 just can pass through tringByEvaluatingJavaScriptFromString, without the concrete Chinese meaning) form inject target web, can be specifically the script that injects target web.
Optionally, after conversion, listening the content of label is exactly the content of above-mentioned allocated resource file.
Optionally, converting the character string of injecting in described target web to label can be to convert the character string of injection to label by what inject in described target web with rule corresponding to allocated resource.Wherein, corresponding rule is to stipulate in agreement, can be as follows:
File suffixes | Html tag |
.css | style |
.js | script |
.jpg/.png/.gif | img(Base64) |
Wherein, the expression style sheet that above-mentioned file suffixes is .css, the character string that the first converting unit 622 is just injected style sheet is converted to the label of style form; Above-mentioned file suffixes is the expression JavaScript file of .js, and the character string that the first converting unit 622 is just injected JavaScript file is converted to the label of script form; Above-mentioned file suffixes is the expression picture of .jpg/.png/.gif, and the character string that the first converting unit 622 is just injected picture is converted to the label of img (Base64) form.Optionally, when converting to after label, just can represent target web.
As the optional embodiment of one, represent unit 63 and can also be used in the time that above-mentioned allocated resource file comprises picture, convert the text message after picture conversion to picture, and represent the target web that comprises described picture.
Wherein, the text message that above-mentioned text message can Base64 form, downloads after above-mentioned picture, just converts this picture to text message, and the picture obtaining is in advance preserved with the text of Base64 form.Represent unit 63 and can identify the text message (for example: the text message of Base64 form) that picture converts to, then text information is changed into picture, and represent the target web that comprises this picture.
In the optional embodiment of one, described user terminal can also comprise:
Whether detecting unit (attached not shown in FIG.), be injected in above-mentioned target web for detection of above-mentioned allocated resource file;
The first converting unit 622 can also be used for, when detecting unit (attached not shown in FIG.) testing result is when being, converting the character string of injecting in described target web to label;
Detecting unit (attached not shown in FIG.) also when being no when testing result, is waited for certain time length, continues to carry out to detect above-mentioned allocated resource file and whether be injected in above-mentioned target web, and be yes to testing result.
Optionally, the allocated resource file obtaining in advance, is all provided with file identification, in the time that injection unit 621 injects certain resource file, in the source file of target web, will comprise the variable name of the page of this resource file, this variable name is just the file identification of this resource file.For example, when above-mentioned resource file is resource file corresponding to " http://xyz.com/a.css " path, and when the file identification of this resource file is a.css, in the time that injection unit 621 injects this resource file to target web, the variable that just comprises variable a.css by name in the source file of target web can be specifically window[' a.css '].When window[' a.css ' being detected] when empty, just represent that this resource file is not also injected into, otherwise, represent that this resource file is injected into.
Optionally, whether above-mentioned detecting step can detect above-mentioned allocated resource file by the script of JavaScript form and be injected in above-mentioned target web.
As the optional embodiment of one, the present embodiment can be realized together in conjunction with above-mentioned second device embodiment.Be that user terminal in this enforcement can also comprise: above-mentioned setting unit, download unit and storage unit.
In technique scheme, on the basis of embodiment, the multiple implementation that allocated resource file is injected is elaborated in the above, to realize the speed that improves web page access.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, can carry out the hardware that instruction is relevant by computer program to complete, described program can be stored in a computer read/write memory medium, this program, in the time carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random access memory (RandomAccess Memory is called for short RAM) etc.
Above disclosed is only preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to the claims in the present invention, still belongs to the scope that the present invention is contained.
Claims (14)
1. a Web access method, is characterized in that, comprising:
Load the target web that does not comprise allocated resource file to browser;
After described target web is loaded in described browser, in described target web, add the described allocated resource file obtaining in advance;
Represent the target web adding after described allocated resource file.
2. the method for claim 1, is characterized in that, the target web that described loading does not comprise allocated resource file is to before in browser, and described method also comprises:
Be provided for downloading the download policy of described allocated resource file;
Download described allocated resource file according to described download policy;
Preserve the allocated resource file of described download.
3. as prescription requires the method as described in 2, it is characterized in that, described browser is the embedded browser that mixes application program, described in be provided for downloading described allocated resource file download policy comprise:
In the root directory of described mixing application program, add the configuration file of the download policy for downloading described allocated resource file.
4. method as claimed in claim 2 or claim 3, is characterized in that, described download policy comprises:
The download path information of described specified file and/or the file name information of described specified file.
5. the method as described in any one in claim 1-3, is characterized in that, the described described allocated resource file obtaining in advance that adds in described target web comprises:
The described allocated resource file obtaining is in advance injected to described target web with the form of character string;
Convert the character string of injecting in described target web to label.
6. method as claimed in claim 2 or claim 3, it is characterized in that, in the time of described allocated resource file including picture, described download described allocated resource file according to described download policy after, before the allocated resource file of the described download of described preservation, described method also comprises:
Convert the picture of download to text message;
The allocated resource file of the described download of described preservation comprises:
Preserve the text message after described conversion.
7. method as claimed in claim 6, is characterized in that, in the time of described allocated resource file including picture, described in represent add after the target web of described allocated resource file comprise:
Convert described text message to picture, and represent the target web that comprises described picture.
8. a user terminal, is characterized in that, comprising: loading unit, adding device and represent unit, wherein:
Described loading unit, for loading the target web that does not comprise allocated resource file to browser;
Described adding device at described loading unit, described target web being loaded on after described browser, adds the described allocated resource file obtaining in advance in described target web;
The described unit that represents, adds the target web after described allocated resource file for representing described adding device.
9. terminal as claimed in claim 8, is characterized in that, described terminal also comprises:
Setting unit, for being provided for downloading the download policy of described allocated resource file;
Download unit, for downloading described allocated resource file according to described download policy;
Storage unit, for preserving the allocated resource file of described download.
10. terminal as claimed in claim 9, it is characterized in that, described browser is the embedded browser that mixes application program, and described setting unit is also added the configuration file of the download policy for downloading described allocated resource file for the root directory in described mixing application program.
11. terminals as described in 8 or 9 of claims, is characterized in that, described download policy comprises:
The download path information of described specified file and/or the file name information of described specified file.
12. terminals as described in any one in claim 8-10, is characterized in that, described adding device comprises:
Injection unit, for described target web being loaded on after described browser at described loading unit, the described allocated resource file obtaining is in advance injected to described target web for the described allocated resource file obtaining is in advance injected to described target web with the form of character string with the form of character string;
The first converting unit, converts label to for the character string that described target web is injected.
13. terminals as claimed in claim 8 or 9, is characterized in that, described in the time of described allocated resource file including picture, described terminal also comprises:
The second converting unit, for converting the picture of download to text message;
Described storage unit, also for preserving the text message after described the second converting unit conversion.
14. terminals as claimed in claim 13, is characterized in that, described in represent unit also for when the described allocated resource file including picture, convert described text message to picture, and represent the target web that comprises described picture.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210580440.XA CN103902588A (en) | 2012-12-27 | 2012-12-27 | Webpage access method and user terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210580440.XA CN103902588A (en) | 2012-12-27 | 2012-12-27 | Webpage access method and user terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103902588A true CN103902588A (en) | 2014-07-02 |
Family
ID=50993916
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210580440.XA Pending CN103902588A (en) | 2012-12-27 | 2012-12-27 | Webpage access method and user terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103902588A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104615756A (en) * | 2015-02-12 | 2015-05-13 | 北京航空航天大学 | Webpage loading method |
CN105512278A (en) * | 2015-12-04 | 2016-04-20 | 小米科技有限责任公司 | Webpage display method and device |
CN106126655A (en) * | 2016-06-27 | 2016-11-16 | 乐视控股(北京)有限公司 | Webpage preservation treatment method and device |
CN106294648A (en) * | 2016-08-03 | 2017-01-04 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device for page access path |
CN108234399A (en) * | 2016-12-15 | 2018-06-29 | 腾讯科技(深圳)有限公司 | A kind of interface communication method and terminal |
CN108460053A (en) * | 2017-02-20 | 2018-08-28 | 平安科技(深圳)有限公司 | File memory method and device |
WO2020015162A1 (en) * | 2018-07-18 | 2020-01-23 | 平安科技(深圳)有限公司 | Image processing method for hybrid application, apparatus, computer device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102073693A (en) * | 2010-12-28 | 2011-05-25 | 广州杰赛科技股份有限公司 | XML-based data communication method and system |
US7975025B1 (en) * | 2008-07-08 | 2011-07-05 | F5 Networks, Inc. | Smart prefetching of data over a network |
CN102402518A (en) * | 2010-09-09 | 2012-04-04 | 中国移动通信有限公司 | Method and device for accessing webpage |
CN102438045A (en) * | 2011-12-07 | 2012-05-02 | 深圳市深信服电子科技有限公司 | Method and system for pre-fetching web page, and method for accessing web page |
-
2012
- 2012-12-27 CN CN201210580440.XA patent/CN103902588A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7975025B1 (en) * | 2008-07-08 | 2011-07-05 | F5 Networks, Inc. | Smart prefetching of data over a network |
CN102402518A (en) * | 2010-09-09 | 2012-04-04 | 中国移动通信有限公司 | Method and device for accessing webpage |
CN102073693A (en) * | 2010-12-28 | 2011-05-25 | 广州杰赛科技股份有限公司 | XML-based data communication method and system |
CN102438045A (en) * | 2011-12-07 | 2012-05-02 | 深圳市深信服电子科技有限公司 | Method and system for pre-fetching web page, and method for accessing web page |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104615756A (en) * | 2015-02-12 | 2015-05-13 | 北京航空航天大学 | Webpage loading method |
CN104615756B (en) * | 2015-02-12 | 2017-12-01 | 北京航空航天大学 | Webpage loading method |
CN105512278A (en) * | 2015-12-04 | 2016-04-20 | 小米科技有限责任公司 | Webpage display method and device |
CN106126655A (en) * | 2016-06-27 | 2016-11-16 | 乐视控股(北京)有限公司 | Webpage preservation treatment method and device |
CN106294648A (en) * | 2016-08-03 | 2017-01-04 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device for page access path |
CN108234399A (en) * | 2016-12-15 | 2018-06-29 | 腾讯科技(深圳)有限公司 | A kind of interface communication method and terminal |
CN108234399B (en) * | 2016-12-15 | 2020-11-06 | 腾讯科技(深圳)有限公司 | Interface communication method and terminal |
CN108460053A (en) * | 2017-02-20 | 2018-08-28 | 平安科技(深圳)有限公司 | File memory method and device |
WO2020015162A1 (en) * | 2018-07-18 | 2020-01-23 | 平安科技(深圳)有限公司 | Image processing method for hybrid application, apparatus, computer device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103902588A (en) | Webpage access method and user terminal | |
CN109388766B (en) | Page loading method and device | |
CN110968824B (en) | Page data processing method and device | |
US8645453B2 (en) | Method and system of processing cookies across domains | |
JP2019032883A (en) | Method, apparatus, server and system for implementing web application | |
CN107291759B (en) | Method and device for processing browser page resources | |
CN107590228B (en) | Page content processing method and mobile terminal | |
CN106484383A (en) | page rendering method, device and equipment | |
CN106649543B (en) | Method, device and terminal for recording reading progress | |
US10284686B2 (en) | Server, client, system and method for preloading browsed page in browser | |
CN102402518A (en) | Method and device for accessing webpage | |
CN108932332A (en) | The loading method and device of static resource | |
CN102646135A (en) | Webpage collecting method, device and system | |
CN109684571B (en) | Data acquisition method and device and storage medium | |
CN108595697B (en) | Webpage integration method, device and system | |
Deitel et al. | Java Web Services: For Java Programmers | |
US20210081464A1 (en) | Crawlability of single page applications | |
CN110442286B (en) | Page display method and device and electronic equipment | |
CN104239441A (en) | Web page loading control method and device | |
CN110457628A (en) | Webpage edition correcting method, device, equipment and storage medium | |
CN104636396A (en) | Page positioning method and device | |
CN110825600B (en) | Page information processing method, server and page display device | |
CN102624910B (en) | Method, the Apparatus and system of the web page contents that process user chooses | |
CN108319474B (en) | Page information generation method, device and equipment | |
CN102955852A (en) | Method, device and equipment for webpage resource processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140702 |
|
RJ01 | Rejection of invention patent application after publication |