CN107203555A - Page loading processing method and device - Google Patents
Page loading processing method and device Download PDFInfo
- Publication number
- CN107203555A CN107203555A CN201610154563.5A CN201610154563A CN107203555A CN 107203555 A CN107203555 A CN 107203555A CN 201610154563 A CN201610154563 A CN 201610154563A CN 107203555 A CN107203555 A CN 107203555A
- Authority
- CN
- China
- Prior art keywords
- bag
- line data
- target
- data bag
- configuration information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
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
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the present application discloses page loading processing method and device, and methods described includes:Off-line data bag is provided, the off-line data bag includes interior configuration information and many parts of data contents;The target pages file access request produced in application is kidnapped, judges that the off-line data bag whether there is the corresponding target data content of target URL information using configuration information in the bag;If there is the target data content, then intercept the target pages file access request, and utilize the target data content in the off-line data bag, pagefile access response data are built by way of simulation browser is responded, and the response data is returned to using built-in browser control part.By the embodiment of the present application, while solving to improve page loading velocity, the robustness of scheme is improved.
Description
Technical field
The application is related to page loading processing technical field, more particularly to page loading processing method and device.
Background technology
Hybrid App (mixed mode Mobile solution) are mobile Internet application and development patterns conventional at present,
Under this pattern, developer can be embedded into HTML5 application programs in one thin thin primary container
Face so that Hybrid App can integrate the advantage of native applications program and HTML5 application programs.
But, due to Hybrid App median surfaces render needs HTML (HyperTextMark-upLanguage,
HTML), CSS (Cascading Style Sheet, Cascading Style Sheet) and JS (Javascript)
File usually requires request server acquisition, accordingly, it is possible to can have the problem of page load time is long, shadow
Ring Consumer's Experience.
In order to solve the problem of page load time is long, for iOS platforms, there are two kinds of sides in the prior art
Formula.First way is that the local loading of static resource is realized by self-defined NSURLCache, specifically
, static resource file JS/CSS is cached locally, when accessing the H5 pages, according to URL
Judge that its corresponding file, whether in local cache, is built if if according to local file content
NSURLResponse is responded and returned.If be not present in local cache, network request remote service
Device, obtains corresponding data, is then added in local cache, is read when being accessed so as to next time from caching.
This mode program can be completely achieved the local loading of the static resources such as JS, CSS and picture, but substantially
Deficiency is the HTML request for locally loading, can not using built-in browser control part UIWebView
Obtain incoming parameter.For example, request access the H5 pages URL (Uniform Resoure Locator,
URL) be:
http://h5.m.taobao.com/trip/holiday/search/search.htmlLat=122&lon=32, but the party
Case is according to http://h5.m.taobao.com/trip/holiday/search/search.html finds corresponding local
File content simultaneously builds response, that is, lat and lon parameter values are eliminated, causes lat and lon parameters
Value can not pass to UIWebView.But, if the parameter value in URL is and page rendering phase
Close, then UIWebView, can be because parameter value can not be obtained when progress html page parsing is rendered
And cause to render failure.
Another settling mode is to build virtual host domains method, first determines whether HTML type requests correspondence
File content whether in local disk, if can locally find, by its domain name be changed to one it is virtual
Host, then asks all static resource files (HTML, JS, CSS and picture) under the domain name
Local loading is redirected to, without accessing server.That is, once finding that certain HTML be may I ask
File content have preservation in local disk, then by the CSS with the HTML with same domain name, JS,
The domain name of the requests such as picture is also all modified as virtual host so that the access to files such as CSS, JS, pictures
Also all it is redirected to local disk.Then by way of in local structure response, to UIWebView
Return to response.This mode can either realize the local loading of the files such as CSS, JS, can also realize HTML
Local loading, but have the disadvantage that:One H5 page is typically by a html file, some
CSS files, some JS files and some pictures composition, the program can not also know html file in advance
Which JS/CSS file request included actually, thus can not judge JS, CSS file that it includes whether
Exist in local disk.So, if html file is in local disk, but the html file please
JS, the CSS asked after local disk, the then domain name for changing each JS, CSS request, can not obtain one
Individual non-existent virtual Domain, therefore, it is impossible to response is built from local, and then page access will malfunction.
To sum up, how further to optimize page loading flow, solve the same of the long problem of page load time
When, the robustness of scheme is improved, as the technical problem for needing those skilled in the art to solve.
The content of the invention
This application provides page loading processing method and device, while solving to improve page loading velocity,
The robustness of raising scheme.
This application provides following scheme:
A kind of page loading processing method, it is characterised in that including:
Off-line data bag is provided, the off-line data bag includes interior configuration information and many parts of data contents,
Configuration information includes being used to access each in every part of data content one pagefile to be visited of correspondence, the bag
Between relative path information of the uniform resource position mark URL information and date content of pagefile in bag
Corresponding relation;
The target pages file access request produced in application is kidnapped, the target pages file is determined
The target URL information of access request, and judge that the off-line data bag is using configuration information in the bag
It is no to there is the corresponding target data content of the target URL information;
If there is the target data content, then the target pages file access request is intercepted, and utilize
Target data content in the off-line data bag, pagefile is built by way of simulation browser is responded
Access response data, and the response data is returned to using built-in browser control part.
A kind of page loading processing device, it is characterised in that including:
Off-line data bag provides unit, and for providing off-line data bag, the off-line data bag includes interior
Configuration information and many parts of data contents, every part of data content one pagefile to be visited of correspondence are described
Configuration information includes being used to access in the uniform resource position mark URL information and date of each pagefile in bag
Hold the corresponding relation between the relative path information in bag;
Judging unit, for kidnapping the target pages file access request produced in application, determines institute
The target URL information of target pages file access request is stated, and judges institute using configuration information in the bag
Off-line data bag is stated with the presence or absence of the corresponding target data content of the target URL information;
Response data construction unit, for if there is the target data content, then intercepting the page object
Face file access request, and using the target data content in the off-line data bag, pass through simulation browser
The mode of response builds pagefile access response data, and the response data is returned to using built-in
Browser control part.
The specific embodiment provided according to the application, this application discloses following technique effect:
By the embodiment of the present application, due to the pagefile for types such as HTML, CSS, JS, pictures
Access request, can all judge to whether there is corresponding target data content in off-line data bag, so, even if
Html file is in off-line data bag, but JS files, the CSS files included under the same H5 pages etc.
Also be not in the situation of webpage mistake not in off-line data bag.Afterwards, if deposited in off-line data bag
In target data content, then by way of complete simulation browser is responded, the mesh in off-line data bag is utilized
Mark data content and build response data, and return to the built-in browser control part progress parsing of application and render.Phase
Between need not carry out replacement of virtual Domain etc. operation, therefore, completely support from off-line data bag load
During HTML request, to browser control part transmit arbitrary parameter, JS request, CSS request due in the absence of
Parameter is transmitted, therefore can more support to load from off-line data bag.In a word, it is right by the embodiment of the present application
In the access request of all kinds file, it can realize from the loading of off-line data bag, and with high Shandong
Rod.
Under a kind of preferred implementation, off-line data bag can be realized and divided by business module, because
This, what is updated every time is the offline bag of module rather than all App offline bag, updates inclusion product
It can diminish, the cost of renewal can be reduced, and flexibility can be improved.
Under another preferred implementation, by providing public off-line data bag and the offline number of lazy loading
According to bag scheme, it can preferably reduce the volume of off-line data bag, and reduce application program installation kit
Volume.
Under another preferred implementation, it is possible to use caching mechanism, the correlation that is related to will be accessed first
Data add caching, and follow-up access, which is postponed, deposits into row, and global configuration information is resided in internal memory, from
And magnetic disc i/o number of times is reduced to greatest extent, further improve the time of loading page.
Certainly, any product for implementing the application it is not absolutely required to while reaching all the above advantage.
Brief description of the drawings
, below will be to implementing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art
The accompanying drawing used required in example is briefly described, it should be apparent that, drawings in the following description are only
Some embodiments of the present application, for those of ordinary skill in the art, are not paying creative work
Under the premise of, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the packet conceptual schematic view that the embodiment of the present application is provided;
Fig. 2 is the flow chart for the method that the embodiment of the present application is provided;
Fig. 3 is the flow chart for the another method that the embodiment of the present application is provided;
Fig. 4 be in the embodiment of the present application with page load time contrast schematic diagram of the prior art;
Fig. 5 is the schematic diagram for the device that the embodiment of the present application is provided.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clear
Chu, it is fully described by, it is clear that described embodiment is only some embodiments of the present application, rather than
Whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art obtained it is all its
His embodiment, belongs to the scope of the application protection.
In the embodiment of the present application, in order to further optimize page loading flow, page load time is being solved
While long problems, robustness, the robustness of page loading scheme are improved, off-line data bag can be provided,
Using in the process of running, pagefile access request can be intercepted by protocol class registered in advance,
After specific pagefile access request is intercepted, either html file access request, or CSS
File access request, JS file access requests or picture file access request, are all judged first, with
Determine and whether there is the corresponding data content of pagefile access request in off-line data bag, if it does,
It can then utilize the data content in off-line data bag, in the way of complete simulation browser is responded, build page
Face file access response data, and return to using built-in browser control part, the parsing for carrying out the page is rendered
Deng operation.In this scenario, due to the access request to various file types, off-line data bag can all be judged
In whether there is corresponding data content, if it is present data content in off-line data bag is carried out
Loading, otherwise, is loaded by original URL request from remote server.So, even if html file
In off-line data bag, but JS files, the CSS files included under the same H5 pages etc. is not being counted offline
Also be not in the situation of webpage mistake during according to bag.In addition, by way of complete simulation browser is responded
Build response data, it is not necessary to carry out the operation such as replacement of virtual Domain, therefore, support completely from off-line data
When wrapping the HTML request of loading, arbitrary parameter is transmitted to browser control part.That is, the application is real
The page loading scheme of example offer is provided, for the access request of all kinds file, can be realized from offline
Packet is loaded, and with high robustness.
For the ease of understanding the technical scheme of the embodiment of the present application, first below to be related to some are related
Concept and effect are introduced.
Referring to Fig. 1, the concept being related in the embodiment of the present application includes:
1st, on off-line data bag.In the embodiment of the present application, it can include first in off-line data bag many
Divided data content, wherein every part of data content one pagefile to be visited of correspondence, the pagefile bag
Include html file, CSS files, JS files or picture file, that is to say, that various types of pages
The data content of file can be preserved in off-line data bag.
2nd, on configuration information in bag.Due to preserving many parts of data contents, every part in an off-line data bag
Data content one pagefile of correspondence, in order to when intercepting specific pagefile access request, judge
It whether there is the corresponding data content of the request in off-line data bag, configuration information in a bag can be provided.Should
Information can exist in forms such as files, wherein, configuration information includes in bag:For accessing each page text
Corresponding relation between relative path information of the URL information and data content of part in bag.
For example, specific information storage configuration can be with as follows:“trip/holiday/search/search.html":
" search/search.html ", the example represents that the URL of pagefile is:
http://h5.m.taobao.com/trip/holiday/search/search.html, this document is in off-line data bag
Relative address is /search/search.htmlL, that is, the search.htmlL files under search catalogues,
Etc..
Wherein, it can know in advance on the URL information for accessing each pagefile, and data
Relative path information of the content in bag, can be configured when generating off-line data bag, that is,
It can in advance know, therefore, mapping relations between the two be recorded in the interior configuration information of bag.
Configuration information can also be stored in off-line data bag in bag.Can be and specific by extension name of file etc.
Data content make a distinction, for example, bag in configuration information can to save as json files, that is,
Extension name, etc. is used as using json.
3rd, on global configuration information.Under normal circumstances, simply applied for some functions, Ke Yiyong
Offline loading of one unified off-line data bag to all pagefiles provides support.But, some functions
More complicated application, comprising page quantity it is very many, often again including HTML under a page
File, some CSS files, some JS files and some picture files, therefore, the number of pagefile
Amount can be huger, now, if all pagefiles are all saved in same off-line data bag,
Then the volume of off-line data bag can be very big, and volume of transmitted data when updating off-line data bag can be very big, it is necessary to consume
Take the long time, doing the spent time from the newest off-line data bag of server download can be long,
Which increase the insecurity of the function, because the time is longer, occurs network interruption or using after being switched to
The probability of platform operation can be bigger, and updating operation may be terminated at any time, especially under 3G network state,
Such case can be even more serious;In addition, inclusion product is too big, server also can for updating the generation logic of bag
Become extremely complex.
For these reasons, it is contemplated that in a large-scale application, it will usually be divided into according to service line multiple
Business module, for example, for Ali's travelling App, generally according to admission ticket, hotel, spending a holiday, beating
The service lines such as car distinguish modules, etc..Therefore, can be according in the preferred embodiment of the application
Using it is interior including multiple business modules there is provided multiple off-line data bags, each off-line data bag correspondence is same
The pagefile access request of each page in business module, also, the respective bag of each off-line data bag correspondence
Interior configuration information.For example, for Ali's travelling App, admission ticket module can be provided respectively corresponding
Corresponding offline business packet of off-line data bag, hotel's module, etc., wherein, admission ticket module is corresponding
Off-line data bag, only including all types of pagefiles included in each page related to admission ticket business, hotel
The corresponding off-line data bag of module, the only all types of pages including including in each page related to hotel business
File, etc..So, the volume of each off-line data bag can be greatly reduced, and be carried out to off-line data bag
During renewal, it can be updated in units of the corresponding off-line data bag of each business module, when updating the data
The data volume of transmission is greatly reduced.
Certainly, in this manner, due to configuration file in the respective bag of each off-line data bag correspondence,
That is, configuration file only needs to interior each file URL of one packet of record in one bag and data content exists
Corresponding relation in bag between relative path, it is therefore, actually right in order to navigate to a target URL
The data content answered, in addition it is also necessary to know first the corresponding data contents of the URL be stored in it is specific which from
In line packet.
Therefore, in the embodiment of the present application, additionally providing global configuration information, the information can also be with json
File etc. type is present, for example, H5PackageMap.json etc. can be named as.In global configuration
In information, URL and off-line data bag where corresponding data the content mark (mark of packet can be recorded
Know can be packet title, referred to as " bag name ", naturally it is also possible to be other mark) between correspondence pass
System.For example, it is assumed that the URL for accessing certain pagefile
For:http://h5.m.taobao.com/trip/holiday/search/search.html, the relative path of above-mentioned link
(relativePath) it is trip/holiday/search/search.html, the corresponding data contents of the URL are located at
In the off-line data bag for wrapping entitled h5-holiday, accordingly, it is possible to which corresponding relation is recorded as:
“/trip/holiday/.+”:“h5-holiday”.So, when specifically intercepting pagefile access request,
Corresponding off-line data bag just can be determined according to corresponding URL and above-mentioned corresponding relation is asked
Name.
It should be noted that by previous example to the example of configuration information and global configuration information in bag
It can be seen that, in record URL information with wrapping interior relative path, or off-line data bag name in data content
Between corresponding relation when, URL information is all the corresponding path sections in the URL used
(relativePath), that is, by domain name part (host, such as http://h5.m.taobao.com/) remove.
Because, specifically when preserving configuration information, it can be realized by the way of regular expression, still,
The corresponding request of same pagefile environment on test, pre- hair and line is different host, that is, not
Same URL addresses, if directly going matching with URL, different environment need different regular expressions
Formula, this can increase the data volume of configuration information.And because relativePath does not change with host, therefore,
In the embodiment of the present application, the relativePath of the URL can be taken as basis for estimation, it is so, a
Regular expression can just be adapted to all environment.
In addition, for global configuration information, although the page quantity included in an off-line data bag is obtained
Control (for example, being travelled App for Ali, the off-line data bag of 20 or so is divided into according to service line
Afterwards, the pagefile of 5 to 10 H5 pages is included in each off-line data bag), still, each H5
The page all includes the files such as a html file, and some CSS, JS, picture.For so many
Pagefile, it is difficult to by regular expression by the URL of pagefile all under the off-line data bag
(including JS and CSS files) is mapped to same off-line data bag name.If the mutually same trade can not be realized
The request of business logic is loaded from same off-line data bag, then all off-line data bags can only be put into together
Below one local directory, the function of so dividing off-line data bag by business module also just has no way of realizing.
In this regard, the flow in view of WebKit kernel loads resources is first to load html file, Ran Hou
Parsing HTML loads JS/CSS files therein, institute from top to bottom successively during setting up dom tree
It is HTML resources with what is for a H5 page, loaded first, is subsequently only JS/CSS resources.
Using this feature, in the application preferred embodiment, only it can include in global configuration file
Corresponding relation between the URL of html file and affiliated off-line data bag, the URL of JS/CSS files
Then no longer express, so, be achieved by way of regular expression carries out bag name mapping, because canonical
Expression formula only needs to ensure the URL and off-line data bag name of all HTML requests of matching.Specifically
When intercepting pagefile access request, for html file access request, it can be matched somebody with somebody according to the overall situation
File is put, off-line data bag name is parsed by way of canonical is matched, and bag name can be carried out
The canonical situation that it fails to match occurs in record, follow-up JS/CSS requests, at this point it is possible to from above
The off-line data bag parsed in HTML request obtains data content.When intercepting new HTML request
When, can be to the off-line data bag of record if the off-line data bag name parsed is changed
Name is updated, the JS/CSS requests after the new HTML request, again can be from the offline number after renewal
According to obtaining data content in bag.
4th, on public off-line data bag.In some applications, it is understood that there may be some CSS, JS, picture
Deng pagefile, it can all may be used in different business modules, for this partial page file, at this
In the preferred embodiment of application, can also be preserved by single public off-line data bag, without
Occur once in the corresponding off-line data bag of each business module, can so reduce the body of off-line data bag
Product.Wherein, configuration information and many parts of data contents in public bag can be also included in public off-line data bag,
Wherein, configured in one CSS file of every part of data content correspondence, JS files or picture file, public bag
Information includes the corresponding relation of URL information and data content in bag between relative path information.In addition,
Can also include in global configuration information on the public off-line data bag map information, certainly, due to it is public from
Do not include html file in line packet, and in actual applications, really be able in each business mould
Quantity of documents that can be public between block is simultaneously few, therefore, can be directly according to each in global configuration information
The URL generation regular expressions of CSS/JS/ picture files, and it is mapped to public off-line data bag.Intercepting
During to CSS/JS/ picture file access requests, canonical matching can be carried out first with the URL of request, such as
Fruit can match public off-line data bag, then using configuration information in the bag in public off-line data bag, really
Make corresponding specific data content.If public data bag can not be matched, then judge whether to match
To the corresponding off-line data bag of other each business modules.
In this case, if in global configuration information, for the corresponding off-line data bag of each business module,
Regular expression is generated according only to the URL of html file, then both will not also conflict, because,
CSS/JS/ picture files access request meeting priority match public data bag, and can directly utilize CSS/JS/
The URL of picture file access request is matched with public data bag.Public data bag can not matched
In the case of, then off-line data bag corresponding with other specific business modules matched, now, according still further to
Manner described above, takes the corresponding target off-line data of the html file access request intercepted recently
Bag, and therefrom obtain the corresponding data content of CSS/JS/ picture file access requests.
5th, on lazyness loading bag.Under normal circumstances, off-line data bag can be carried in App installation,
As installation kit is downloaded to terminal device locally together, the local disk a specified mesh is unziped to again afterwards
Under record, the data loaded offline are obtained from the catalogue.But in actual applications, some business modules
In the page there may be the relatively low situation of access frequency, the utilization rate of corresponding off-line data bag is also than relatively low.
In this case, can be by the relatively low offline number of this access frequency in the preferred embodiment of the application
It is referred to as " lazyness loading bag " according to bag, for this off-line data bag, it may not be necessary to be put into APP installation kits
Row issue.However, it is possible to the configuration information on this lazy loading bag is recorded in global configuration information,
That is, specific page request can be matched to this lazy loading to wrap, in addition, in global configuration information
The download address of lazy loading bag can also be preserved.So, can first basis when user accesses these pages
Global configuration information, which is determined, has corresponding off-line data bag, then judges in local disk with the presence or absence of pass
In the data of the off-line data bag, if it does not exist, then prove the business module be it is accessed first, now,
A download sub-line journey can be created, by the download sub-line journey according to the packet recorded in global configuration information
Download address, accesses remote server, wraps what is specified in locally downloading disk offline by the page is corresponding
Under catalogue, when intercepting the pagefile access request related to the off-line data bag again next time, just directly
Corresponding specific data content in off-line data bag can be obtained from local disk.
Each conception of species being related in the embodiment of the present application is described above, the application implemented below
The specific page loading processing flow that example is provided describes in detail.
Referring to Fig. 2, the embodiment of the present application provides a kind of page loading processing method, and this method specifically can be with
Comprise the following steps:
S201:Off-line data bag is provided, the off-line data bag includes interior configuration information and many numbers
According to content, every part of data content one pagefile to be visited of correspondence, the pagefile includes hypertext
In markup language html file, Cascading Style Sheet CSS files, JS files or picture file, the bag
The uniform resource position mark URL information and date content that configuration information includes being used to access each pagefile exists
The corresponding relation between relative path information in bag;
On off-line data bag, under normal conditions, can together it be issued with App installation kits,
So, when App is installed on the terminal device of oneself by user, off-line data bag is also downloaded together
To terminal device local disk.Wherein, off-line data bag can be with zip packet forms in App installation kits
In the presence of, and App bags can not change, can be under sandbox in order to realize that the dynamic of off-line data bag updates
Off-line data bag is operated, can be by zip bags from app so need after App installations and when being initially opened
The sandbox catalogue specified is copied and unziped in installation kit.Wherein, if off-line data be surrounded by it is multiple,
Then global configuration file (for example, H5PackageMap.json) can also be included in App installation kits,
And be extracted together with Zip bags to specified sandbox catalogue.So-called sandbox refers in limited security context
A kind of way of application program is run, this way is to limit the code access permissions for authorizing application program.
On implementing for sandbox, and the category of the embodiment of the present application protection is not belonging to, I will not elaborate.
It is of course also possible to when first time is accessed, then off-line data bag is downloaded into terminal from server set
Standby local disk.Or, in the case where there are multiple off-line data bags, can by access frequency it is high from
Line packet is carried in installation kit, the low off-line data bag of access frequency is preserved on the server, first
When secondary accessed, then download from a server local sandbox (namely so-called lazy loading packet mode).
S202:The target pages file access request produced in application is kidnapped, the page object is determined
The target URL information of face file access request, and judge the offline number using configuration information in the bag
It whether there is the corresponding target data content of the target URL information according to bag;The target pages file is visited
Ask that request includes html file access request, CSS file access requests, JS file access requests or figure
Piece file access request;
In order to be intercepted to the target pages file access request produced in application, when implementing,
There can be a variety of implementations.For example, under one of which implementation, can be carried beforehand through inheritance system
The preset protocol class supplied, and Key Functions therein are rewritten, custom protocol class is generated, and beaten in application
The custom protocol class is registered when opening, thus can be using the custom protocol class to application
The target pages file access request of middle generation is intercepted.
Specifically, under iOS system, the embodiment of the present application can using NSURLProtocol and
NSURLProtocolClient realizes that Hybrid App load local page.By inheriting
NSURLProtocol simultaneously rewrites Key Functions and realizes self-defined FusionURLProtocol, then passes through side
Method [NSURLProtocol registerClass:[FusionURLProtocol class]] to register this self-defined
Protocol, so, FusionURLProtocol just can control the page access in application.
Wherein, NSURLProtocol is Cocoa Touch frameworks (software development api, for developing
IPhone iPod software on iPad, this storehouse exists in the form of a series of framework storehouses, supports developer
Use user interface element build image conversion event driven application program) provide abstract class, be by one
The call back function composition of row, for the structure that provides the foundation of loading url data, can kidnap it is global by
The network request that NSURLConnection is initiated, can be realized by rewriteeing NSURLProtocol methods
Customization initiate request request, return working process after data, existing procotol is improved and
Supplement process, global buffer are supported, User-Agent is changed and HTTP Proxy.NSURLProtocolClient
The method that NSURLProtocol object control URL Loading System load URL is provided, when
NSURLProtocol objects can just be called when carrying out various operations to the corresponding data contents of URL
NSURLProtocolClient method.
In the embodiment of the present application, UIWebView can be used to go to realize using built-in browser control part work(
Can, and UIWebView Internet resources loading function is based on NSURLConnection realizations,
Therefore the process of whole UIWebView loading pages can be interfered using NSURLProtocol.Specifically,
NSURLConnection each request can remove all registered Protocol of traversal, when calling readjustment
During function canInitWithRequest, first return value can handle this for YES Protocol
NSURLConnection is asked.It is that last in, first out to travel through the principle followed, the traversal at first registered the latest,
So if also there is the Protocol of other functions, then it can finally register and the page is realized in the embodiment of the present application
The Protocol of access control function is loaded, to reduce the execution of operation bidirectional, efficiency is improved.
When implementing, it is contemplated that specific pagefile access request, the behaviour performed according to request to data
Divided as type, the polytypes such as GET, POST, DELETE, PUT can be divided into.Wherein,
The data of POST request must be submitted to remote server preservation, therefore can not be carried out by offline packet mode
Loading.DELETE request needs to delete resource from server, and PUT request needs to store data into clothes
Business device, therefore, need not only change the GET request of server content could use from off-line data bag
Loaded.Therefore, when implementing, the target pages file access that can also be produced in application
Before request is intercepted, the operation that the target pages file access request is performed to data can also be determined
Type, if belonging to object run type, for example, GET types, then please to target pages file access
Ask and intercepted, otherwise without intercepting, directly responded by remote server.
When implementing, in iOS system, in order to realize above-mentioned judgement, NSURLProtocol can be rewritten
Call back function+(BOOL) canInitWithRequest:(NSURLRequest*) request, this method can root
Decide whether to intercept this access request according to the relevant information in access request, return value is that YES represents to block
This request is cut, return value is that NO represents not intercept.Idiographic flow can be:First, it is determined that access request
HttpMethod methods whether be GET, if GET then returns to YES, if not GET side
Formula return value is NO.Then, according to the URL of access request, can by calling preset power function,
Judge whether its corresponding data content can find in off-line data bag.It is convenient to introduce, can be by the work(
Energy function is named as loadCachedDataForURL, and it enters the URL that ginseng is access request, and return value is
NSData types, if return value data is not sky, illustrate that local offline bag has its corresponding content, then
CanInitWithRequest function return values are YES, intercept the request, if return value data is sky, are said
Corresponding contents are not present in bright local offline bag, and canInitWithRequest function return values are NO, are not intercepted
This request, is loaded by remote server.
Wherein, specifically judging that the off-line data bag whether there is the mesh using configuration information in the bag
When marking the corresponding target data content of URL information, that is, judge in bag in configuration information, if exist
Relative path in the corresponding bags of target URL, if there is then prove off-line data bag in there is target URL
The corresponding target data content of information.If only one of which off-line data bag, and would have been downloaded into this earth magnetism
In disk, then physical pathway can be constructed according to relative path in the catalogue where the packet and bag, led to
Cross the physical pathway and get specific target data content.
If there is the corresponding multiple off-line data bags of multiple business modules, then institute can also be utilized first
State global configuration information and judge whether target off-line data bag corresponding with the target URL, if
In the presence of then configuration information in the bag of recycling target off-line data bag, judges in the target off-line data bag
With the presence or absence of the corresponding target data content of the target URL information.
Wherein, if global configuration information only includes html file access request URL information and corresponding number
, then can also be for intercepting recently according to the corresponding relation between the mark of the off-line data bag where content
Html file access request determine after corresponding target off-line data bag mark, to the target from
Line package identification is recorded, when kidnapping to other types file access request, it is possible to use the note
The target off-line data bag mark of record, determines that the corresponding target of the other types file access request is counted offline
According to bag;The other types file access request includes CSS file access requests, JS file access requests
Or picture file access request.
If for CSS files public between different business module, JS files or picture file there is provided
Single public off-line data bag, then kidnap to CSS file access requests, JS file access requests or
When picture file is asked, preferentially using configuration information in the public bag, judge whether deposited in off-line data bag
In target data content corresponding with the target URL.
Specifically, in global configuration information, for public off-line data bag, can record CSS files,
The URL information and corresponding data content of JS files or picture file are between the mark of public off-line data bag
Corresponding relation.And for the corresponding off-line data bag of specific business module, if only including HTML texts
Corresponding pass between part access request URL information and the mark of the off-line data bag where corresponding data content
System, then when kidnapping to other types file access request, first with the global configuration information, judge
It whether there is the corresponding target data contents of the target URL in the public off-line data bag, if deposited
Then using configuration information in the public bag, corresponding target is being obtained from the public off-line data bag
Data content.If number of targets corresponding with the target URL is not present in the public off-line data bag
According to content, then the html file access request intercepted recently that can navigate to the record is corresponding
Target off-line data bag is identified, and using configuration information in the bag in the target off-line data bag, judges described
It whether there is the corresponding target data contents of the target URL in target off-line data bag.
In addition, when implementing, from off-line data bag load document, it is related to substantial amounts of magnetic disc i/o operation,
In practice, it has been found that for static resource file (HTML/CSS/JS) request, for example, for same
HTML request, canInitWithRequest functions can perform three I/O operations, and startLoading can be held
Row I/O operation twice, so same html file will be related to five I/O requests.For same
Individual JS/CSS resource files request, canInitWithRequest functions and startLoading functions are respectively performed
I/O operation, so same JS/CSS files just have I/O operation twice.Therefore, in this Shen
NSCache please can be used to cache in embodiment, that is, after I/O read operations first, can be by phase
All read operations of the data are subsequently obtained from caching by the data deposit caching of pass, so can be with
Only once I/O operation is optimized to, all repetition I/O are optimized.
If specifically, the target pages file access request correspondence new page kidnapped is created, that is, being
One html file access request is (because all accessing page requests are accessed from html file
Start), then can will be offline where the corresponding target data contents of target URL, and the URL
Configuration information is added in caching in the corresponding bag of packet.So, kidnapping to page new in the page
During the file access request of face, it is possible to judged to whether there is corresponding data content in caching according to URL,
If it is present proving that the page is accessed, directly it can be rung using the data content in caching
Data are answered to build.If corresponding data content is not present in caching, it may determine that and whether there is in caching
Configuration information in the corresponding bags of the URL, is configured if it is present can utilize in the bag in the caching
Information judges that offline bag is interior with the presence or absence of data content corresponding with the URL of new page file access request,
If it is present obtaining data content from the off-line data bag in disk, and it is added in caching.Work as institute
When the page for stating establishment is closed, then configuration information and mesh in the interior bag related to the page can will be cached
Mark data content release.Certainly, due to the multiple pages of same off-line data bag correspondence, that is to say, that many
When the individual page is accessed, configuration file in the bag of the off-line data bag can be all used, therefore, in a page
When being closed, it can also not discharged temporarily with configuration information in the bag of the page in caching.So, Ke Yishi
Under existing same off-line data bag during all page access, I/O operation only is performed in first time, subsequently
Operation can obtain configuration information in the bag of the data off-line data bag from caching.
In addition, for global configuration file, because all pagefile access requests are required for first with this
Global configuration file is judged, and hence it is also possible to keep the global configuration file to reside in internal memory.Its
In, when implementing, singleton thread can be created, by the singleton thread by the global configuration information
It is read into internal memory.The characteristics of singleton thread is that the thread does not discharge with the closing of the page, so that
The global configuration information can be resided in internal memory, so, utilize that described global configuration information
When judging whether target off-line data bag corresponding with the target URL, it is possible to directly from internal memory
It is middle to read the global configuration information, so that page load time further shortens.
S203:If there is the target data content, then the target pages file access request is intercepted,
And using the target data content in the off-line data bag, page is built by way of simulation browser is responded
Face file access response data, and the response data is returned to using built-in browser control part.
If it is judged that there is the corresponding data content of current page file access request in off-line data bag, then
The target data content can be got, and using the target data content in the off-line data bag, is passed through
The mode of simulation browser response builds pagefile access response data.
Specifically when getting the target data content, because the high high frequency off-line data bag of access frequency is carried
In the installation kit of application, it is possible to when the application is opened first, solved out of described installation kit
The assigned catalogue (sandbox) of local disk is saved in after pressure.Therefore, specifically target is being obtained from local disk
During the corresponding target data contents of URL, it can first determine whether whether the off-line data bag has decompressed and finish,
If it is, by the physical address map of off-line data bag to the assigned catalogue, otherwise, by off-line data
The physical address map of bag is in the installation kit.Afterwards, in conjunction with the off-line data by having confirmed
Relative path in bag name, and bag, it is possible to be assembled into physics absolute path, tool is got by the path
The data content of body.
Wherein, if the low low frequency off-line data bag of access frequency is stored in remote server, but the overall situation
Comprising the corresponding relation between URL and low frequency off-line data bag in configuration information, then in the page being held as a hostage
In the case of the URL correspondences low frequency off-line data bag of face file access request, this can be first determined whether
It whether there is the low frequency off-line data bag in local disk, if it does not exist, then download sub-line journey can be opened,
The download sub-line journey is used to be downloaded the low frequency off-line data bag according to the download address information,
And be saved in the assigned catalogue of local disk, then from the local disk local directory include it is described low
The corresponding data content of pagefile access request being held as a hostage described in being obtained in frequency off-line data bag, goes forward side by side
The structure of row browser response data.
Specifically when building response data, it can be entered by way of simulating real browser response completely
OK, so, for browser control part, its obtained response data, with the sound returned from remote service
It is identical to answer data, therefore, and the parsing to all kinds pagefile can be realized completely and is rendered.Its
In,, just can be according to HTTP if pagefile access request is HTTP request when implementing
Agreement constructs http response data.Wherein, http response packet contains two parts, and a part is
NSHTTPURLResponse (head response), it is used to notify browser control part to ask the type of resource, number
According to length and the URL of request, another part is data NSData, and the body for representing response data (rings
Answer body) content.
So, specifically when building http response data, it is possible to first according in the target URL
Suffix information, and correspondence target data content length information, generation http response head, then
According to the target URL, http response head, http response conditional code (for example, 200) and
Http protocol version information (for example, HTTP/1.1), builds head response, and according to the target data
Content builds response body, afterwards again returns to the head response and response body using built-in browser control
Part.So, browser control part can just be performed specific parsing and rendered behaviour using head response and response body
Make.
In a word, by the embodiment of the present application, due to the page for types such as HTML, CSS, JS, pictures
Face file access request, can all judge to whether there is corresponding target data content in off-line data bag, so,
Even if html file is in off-line data bag, but JS files, the CSS texts included under the same H5 pages
Part etc. is also not in the situation of webpage mistake not in off-line data bag.Afterwards, if off-line data bag
In there is target data content, then by way of complete simulation browser is responded, using in off-line data bag
Target data content build response data, and return to and carry out parsing using built-in browser control part and render.
Period need not carry out the operation such as replacement of virtual Domain, therefore, support what is loaded from off-line data bag completely
During HTML request, to browser control part transmit arbitrary parameter, JS request, CSS request due in the absence of
Parameter is transmitted, therefore can more support to load from off-line data bag.In a word, it is right by the embodiment of the present application
In the access request of all kinds file, it can realize from the loading of off-line data bag, and with high Shandong
Rod.
It is described above to provide a variety of implementations, in actual applications, it can select wherein more preferred
Implementation.For example, under in one way in which, can be according to multiple business modules in App, can
To provide multiple off-line data bags, there is public off-line data bag and lazy loading off-line data bag.In order to subtract
Few I/O number, also using cache mode, data in off-line data bag (including wrap interior configuration information and
The corresponding data content of specific pagefile) caching can be write when being read and write first time, exited in the page
When, the data content of related pages file can discharge from caching.On configuration information, Ke Yi in bag
Each page related to the off-line data bag discharges from caching again after all exiting.In addition, matching somebody with somebody on the overall situation
Confidence ceases, and can be that internal memory is read in when using first, and reside in internal memory.Under this implementation,
When implementing, referring to Fig. 3, the page loading method that the embodiment of the present application is provided may comprise steps of:
S301. the pagefile access request in application is kidnapped;
S302. the file operation type to request judges, if belonging to GET types, into S303,
Otherwise request is let pass, loaded from remote server;
S303. judge with the presence or absence of the corresponding data content of pagefile request in caching, if it does,
The data content of pagefile is then directly obtained from caching, for the structure of response data, otherwise, is entered
Enter S304;
S304. judge with the presence or absence of configuration information in the corresponding bag name of pagefile request and bag in caching,
If it is present illustrating that the corresponding off-line data bag of the pagefile is accessed, S311 can be entered,
Otherwise, illustrate that the pagefile may not have without corresponding off-line data bag, or corresponding off-line data report
Have accessed, configuration information can be obtained from local disk in related data content, bag, therefore, can
To enter S305;
S305. the global configuration information in the URL asked according to the pagefile, audit memory, judging should
Whether URL corresponding off-line data bags name is empty, if sky, then proves that the pagefile may not be
In off-line data bag, or, the pagefile access request is probably that CSS, a JS or picture are asked,
Rather than HTML request, at this point it is possible to enter S311;Otherwise, if being not sky, into S306;
S306. the local physical address of off-line data bag is determined;
S307. judge that the local physical address whether there is corresponding off-line data APMB package, if it does not,
Then enter lazy loading mode, and be also located at remote server, therefore, into S311;If it is present
Into S308;
S308, obtains configuration information in bag, and current page file access request is judged according to configuration information in bag
The corresponding data contents of URL whether be empty, if sky, it was demonstrated that in the absence of corresponding with the pagefile
Local data content, therefore null value can be returned to, and then the request can be let pass, from remote server
Loaded;If being not sky, into S309;
S309. configuration information in the corresponding bag name of the request of the nearest abduction of record and bag is replaced,
For determine the corresponding off-line data bag of the follow-up CSS kidnapped, JS, picture access request and
Configuration information in bag;
The step is in order to solve the problem of JS/CSS requests can not hit regular expression, when by foregoing
In the new off-line data bag of step acquisition and bag during configuration information, illustrate that the new page next may be accessed,
Therefore replacement operation can be done, new JS/CSS requests is mapped to new off-line data bag.
Wherein, it is each due to only being included in public off-line data bag in the case where there is public off-line data bag
The public JS/CSS of module data content, therefore, matches somebody with somebody confidence in the new off-line data bag of acquisition and bag
During breath, the type of new off-line data bag can also be judged, if public data bag, then can not
Next proof will access new page, therefore, need not also perform replacement operation.
S310. configuration information in the bag name and bag after replacement is written in caching, and enters S311;
S311. the physics absolute path of data content is determined;
Asked first for HTML, when going to the step, illustrate to have been obtained for match somebody with somebody in bag name and bag
Confidence ceases, and is asked for JS/CSS, because first asking HTML, therefore, above-mentioned interior in step S309
Appearance has been obtained for preserving, in a word, and when going to this, configuration information is present in bag name and bag.Utilize
Preset function can obtain the physical address of off-line data bag according to bag name, according to configuration information in bag
(abc.json) mapping table can obtain the relative path of its respective file, off-line data packet address+relative path
It is exactly the final absolute path of URL respective files.
In addition, specially treated can be done for the URL request for being mapped to public data bag, because in step
It is no in S309 to do replacement operation, that is, the abc.json contents in the step now for public data bag
It is not the configuration content of public data bag, therefore abc.json can be obtained from public data bag again,
And then obtain relative path in the corresponding bags of URL.
S312. judge that the corresponding data content of physics absolute path whether there is, if it does not exist, then returning
Sky, and then the request can be let pass, loaded from remote server, otherwise, into S313;
S313. off-line data content is obtained, response data is set up.
Obtained by reading local offline bag after the data content of off-line files, caching can be deposited into
NSCache, when subsequently received identical URL request, without carrying out disk read operation or above-mentioned step
Suddenly, data are obtained directly from internal memory.
It can be seen that, entering S311 approach has three kinds, and a variety of different the first situation of situation are corresponded to respectively,
Configuration information can be obtained from caching in bag name and bag, illustrate the off-line data bag of current URL request by
Access;Second of situation, it is impossible to obtain the corresponding off-line data bag names of URL, say that the URL request can
Can be JS, CSS or picture request, it is impossible to obtained in steps of 5 according to H5CacheList regular expression
Take bag name;The third situation, can both obtain bag name, bag configuration content can be obtained again, it is one to illustrate this
HTML request, and be to ask first, disk can be read and obtain data content.It is specific under each case
Determine that the mode of physics absolute path may refer to introduction hereinbefore, in addition, on lazy loading mode, public affairs
With the related processing mode such as off-line data bag, can also here it be repeated no more referring to introduction hereinbefore.
In order to more intuitively determine effect that the embodiment of the present application is obtained in terms of page load time, the application
Inventor have selected above-mentioned preferred implementation, and implement in Taobao's travelling client.Fig. 4 is using upper
The statistics that preferred implementation carries out contrast test is stated, wherein, ordinate represents the load time.At this
In test, counted for Ali's travelling 20 emphasis pages of client, test result is shown, is utilized
The page loading scheme that the embodiment of the present application is provided, average load time of each page is 0.352s (in figure
Single page etc. under the comparing result of some importance page, including list pages of international air ticket, international air ticket is only shown).
And if without using the page loading scheme of the embodiment of the present application, then the above-mentioned statistics page average load time be
1.423s, it is seen then that page loading velocity improves 4 times or so.
Corresponding with the page loading processing method that the embodiment of the present application is provided, the embodiment of the present application is additionally provided
A kind of page loading processing device, wherein, referring to Fig. 5, the device can include:
Off-line data bag provides unit 501, and for providing off-line data bag, the off-line data bag includes
Configuration information and many parts of data contents in bag, every part of data content one pagefile to be visited of correspondence,
The pagefile includes HTML html file, Cascading Style Sheet CSS files, JS texts
Configuration information includes the URL for being used to access each pagefile in part or picture file, the bag
Corresponding relation between the relative path information of URL information and data content in bag;
Judging unit 502, for kidnapping the target pages file access request produced in application, really
The target URL information of the fixed target pages file access request, and sentenced using configuration information in the bag
The off-line data bag that breaks whether there is the corresponding target data content of the target URL information;The mesh
Marking pagefile access request includes html file access request, CSS file access requests, JS files
Access request or picture file access request;
Response data construction unit 503, for if there is the target data content, then intercepting the mesh
Pagefile access request is marked, and using the target data content in the off-line data bag, it is clear by simulating
The mode of device of looking at response builds pagefile access response data, and the response data is returned to using interior
The browser control part put.
Wherein, the off-line data bag provide unit 501 specifically for:
According to the multiple business modules included in the application there is provided multiple off-line data bags, wherein, each
Pagefile to be visited in the same business module of off-line data bag correspondence, each off-line data bag correspondence is respective
Bag in configuration information;
Now, described device also includes:
Global configuration information provider unit, for providing global configuration information, the global configuration information includes
Corresponding relation between the mark of off-line data bag where URL information and corresponding data content;
Accordingly, the judging unit includes:
First judgment sub-unit, for being judged whether and the target using the global configuration information
The corresponding target off-line data bags of URL;
Second judgment sub-unit, for if it is present being configured using in the bag of the target off-line data bag
Information, judges to whether there is the corresponding number of targets of the target URL information in the target off-line data bag
According to content.
Wherein, the global configuration information only includes html file access request URL information and corresponding number
According to the corresponding relation between the mark of the off-line data bag where content, described device also includes:
Recording unit, it is corresponding for being determined in the html file access request for intercepting recently
After target off-line data bag mark, target off-line data bag mark is recorded;
Target off-line data bag determining unit, for when kidnapping to other types file access request, utilizing
The target off-line data bag mark of the record, determines the corresponding target of the other types file access request
Off-line data bag;The other types file access request includes CSS file access requests, JS files and visited
Ask request or picture file access request.
When implementing, the off-line data bag provide unit specifically for:
For CSS files public between different business module, JS files or picture file, there is provided independent
Public off-line data bag, the public off-line data bag includes configuration information and many numbers in public bag
According to content, one CSS file of every part of data content correspondence, JS files or picture file, the public bag
Interior configuration information includes the corresponding relation of URL information and data content in bag between relative path information;
The judging unit specifically for:
In abduction to CSS file access requests, JS file access requests or picture file request, preferentially
Using configuration information in the public bag, judge to whether there is and URL pairs of the target in off-line data bag
The target data content answered.
In the global configuration information, for the corresponding off-line data bag of specific business module, only include
Between the mark of off-line data bag where html file access request URL information and corresponding data content
Corresponding relation, for public off-line data bag, include the URL of CSS files, JS files or picture file
The corresponding relation of information and corresponding data content between the mark of public off-line data bag;
The judging unit includes:
Subelement is recorded, for determining correspondence in the html file access request for intercepting recently
Target off-line data bag mark after, to the target off-line data bag mark record;
3rd judgment sub-unit, for when kidnapping to other types file access request, utilizing the overall situation
Configuration information, judges to whether there is the corresponding number of targets of the target URL in the public off-line data bag
According to content, if it is present using configuration information in the public bag, from the public off-line data bag
Obtain corresponding target data content;The other types file access request please including CSS file accesss
Ask, JS file access requests or picture file access request;
Locator unit, if for being not present and URL pairs of the target in the public off-line data bag
The target data content answered, then navigate to the html file access request intercepted recently of the record
Corresponding target off-line data bag mark, and using configuration information in the bag in the target off-line data bag, sentence
It whether there is the corresponding target data contents of the target URL in the disconnected target off-line data bag.
When implementing, the device can also include:
Singleton thread creation unit, for creating singleton thread, is matched somebody with somebody the overall situation by the singleton thread
Confidence breath is read into internal memory, wherein, the singleton thread does not discharge with the closing of the page, so as to by institute
Global configuration information is stated to reside in internal memory, using global configuration information that described judge whether with
During the corresponding target off-line data bag of the target URL, the global configuration information is read from internal memory.
Wherein, the low low frequency off-line data bag of access frequency is stored in remote server, but the global configuration
The corresponding relation between URL and low frequency off-line data bag is included in information, and preserves the low frequency and is counted offline
According to the download address information of bag;
Described device also includes:
Local judging unit, if the URL correspondences of the pagefile access request for being held as a hostage are described
Low frequency off-line data bag, then judge to whether there is the low frequency off-line data bag in local disk;
Download unit, for downloading sub-line journey if it does not exist, then opening, the download sub-line journey is used for root
The low frequency off-line data bag is downloaded according to the download address information, and is saved in the finger of local disk
Determine catalogue;
Data content acquiring unit, the low frequency for including from the local disk local directory is offline
The corresponding data content of pagefile access request being held as a hostage described in being obtained in packet, and browsed
The structure of device response data.
The high high frequency off-line data bag of access frequency is carried in the installation kit of application, and in the application first
When being opened, the assigned catalogue of local disk is saved in after being decompressed out of described installation kit;
Described device also includes:
Physical address map unit, for obtaining the corresponding target data contents of target URL from local disk
When, judge whether the off-line data bag has decompressed and finish, if it is, by off-line data bag physically
Location is mapped to the assigned catalogue, otherwise, by the physical address map of off-line data bag to the installation kit.
The URL information preserved in the bag in configuration information and global configuration information is for accession page
Relative path information in the URL of file;Judging whether the corresponding number of targets of the target URL
During according to content, using the relative path information in the target URL, with the global configuration information and
Configuration information is matched in bag.
In addition, the device can also include:
Buffer unit, should if created for target pages file access request correspondence new page
The corresponding target data contents of target URL, and configuration information in the corresponding bag of place off-line data bag
It is added in caching;
Data cached judging unit, during for kidnapping to pagefile access request new in the page, according to
URL judges to whether there is corresponding data content in caching, if it is present utilizing the data in caching
Content carries out response data structure;
Cached configuration information judging unit, if for corresponding data content to be not present in caching, utilized
Configuration information judges to whether there is and new page file access request in offline bag in bag in the caching
The corresponding data contents of URL, if it is present data content is obtained from the off-line data bag in disk,
And be added in caching;
Releasing unit is cached, it is interior related to the page for that when the page of the establishment is closed, will cache
Content release.
When implementing, the preset protocol class that can be provided beforehand through inheritance system, and rewrite pass therein
Key function, generates custom protocol class, and the custom protocol class is registered when application is opened,
To be intercepted using the custom protocol class to the target pages file access request produced in application.
In addition, the device can also include:
Action type determining unit, the target pages file access request for being produced in application is blocked
Before cutting, the action type that the target pages file access request is performed to data is determined;
Trigger element is intercepted, if for belonging to object run type, triggered to target pages file access
Request is intercepted.
When implementing, the target pages file access request includes HTTP request, the response data
Structural unit, including:
Head generation subelement is responded, for the suffix information in the target URL, and correspondingly
The length information of target data content, generation http response head;
Head response builds subelement, for being rung according to the target URL, http response head, HTTP
Conditional code and http protocol version information are answered, head response is built;
Respond body and build subelement, for building response body according to the target data content;
Data return to subelement, for the head response and response body to be returned to using built-in browser
Control.
As seen through the above description of the embodiments, those skilled in the art can be understood that this
Application can add the mode of required general hardware platform to realize by software.Understood based on such, this Shen
The part that technical scheme please substantially contributes to prior art in other words can be with the shape of software product
Formula is embodied, and the computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc,
CD etc., including some instructions to cause a computer equipment (can be personal computer, server,
Or the network equipment etc.) perform method described in some parts of each embodiment of the application or embodiment.
Each embodiment in this specification is described by the way of progressive, identical phase between each embodiment
As part mutually referring to what each embodiment was stressed is the difference with other embodiment.
For system or system embodiment, because it is substantially similar to embodiment of the method, so description
Obtain fairly simple, the relevent part can refer to the partial explaination of embodiments of method.System described above and
System embodiment be only it is schematical, wherein the unit illustrated as separating component can be or
It can not be physically separate, the part shown as unit can be or may not be physical location,
A place can be located at, or can also be distributed on multiple NEs.Can be according to actual need
Some or all of module therein is selected to realize the purpose of this embodiment scheme.Ordinary skill
Personnel are without creative efforts, you can to understand and implement.
Above to page loading processing method and device provided herein, it is described in detail, herein
In apply specific case the principle and embodiment of the application be set forth, the explanation of above example
It is only intended to help and understands the present processes and its core concept;Simultaneously for the general technology of this area
Personnel, according to the thought of the application, will change in specific embodiments and applications.It is comprehensive
Upper described, this specification content should not be construed as the limitation to the application.
Claims (21)
1. a kind of page loading processing method, it is characterised in that including:
Off-line data bag is provided, the off-line data bag includes interior configuration information and many parts of data contents,
Configuration information includes being used to access each in every part of data content one pagefile to be visited of correspondence, the bag
Between relative path information of the uniform resource position mark URL information and date content of pagefile in bag
Corresponding relation;
The target pages file access request produced in application is kidnapped, the target pages file is determined
The target URL information of access request, and judge that the off-line data bag is using configuration information in the bag
It is no to there is the corresponding target data content of the target URL information;
If there is the target data content, then the target pages file access request is intercepted, and utilize
Target data content in the off-line data bag, pagefile is built by way of simulation browser is responded
Access response data, and the response data is returned to using built-in browser control part.
2. according to the method described in claim 1, it is characterised in that
The pagefile include HTML html file, Cascading Style Sheet CSS files,
JS files or picture file;
The target pages file access request includes html file access request, CSS file accesss please
Ask, JS file access requests or picture file access request.
3. according to the method described in claim 1, it is characterised in that the offer off-line data bag, bag
Include:
According to the multiple business modules included in the application there is provided multiple off-line data bags, wherein, each
Pagefile to be visited in the same business module of off-line data bag correspondence, each off-line data bag correspondence is respective
Bag in configuration information;
Methods described also includes:
Global configuration information is provided, the global configuration information includes URL information and corresponding data content institute
Off-line data bag mark between corresponding relation;
It is described to judge that the off-line data bag whether there is the target URL using configuration information in the bag
The corresponding target data content of information, including:
Judge whether that target corresponding with the target URL is counted offline using the global configuration information
According to bag;
If it is present using configuration information in the bag of the target off-line data bag, judge the target from
It whether there is the corresponding target data content of the target URL information in line packet.
4. method according to claim 3, it is characterised in that the global configuration information only includes
Between the mark of off-line data bag where html file access request URL information and corresponding data content
Corresponding relation, methods described also includes:
Corresponding target off-line data bag is determined in the html file access request for intercepting recently
After mark, target off-line data bag mark is recorded;
When kidnapping to other types file access request, identified using the target off-line data bag of the record,
Determine the corresponding target off-line data bag of the other types file access request;The other types file is visited
Ask that request includes CSS file access requests, JS file access requests or picture file access request.
5. method according to claim 3, it is characterised in that the offer off-line data bag, bag
Include:
For CSS files public between different business module, JS files or picture file, there is provided independent
Public off-line data bag, the public off-line data bag includes configuration information and many numbers in public bag
According to content, one CSS file of every part of data content correspondence, JS files or picture file, the public bag
Interior configuration information includes the corresponding relation of URL information and data content in bag between relative path information;
It is described to judge that the off-line data bag whether there is the target URL using configuration information in the bag
The corresponding target data content of information, including:
In abduction to CSS file access requests, JS file access requests or picture file request, preferentially
Using configuration information in the public bag, judge to whether there is and URL pairs of the target in off-line data bag
The target data content answered.
6. method according to claim 5, it is characterised in that in the global configuration information, pin
Off-line data bag corresponding to specific business module, only including html file access request URL information with
Corresponding relation between the mark of off-line data bag where corresponding data content, for public off-line data bag,
Including CSS files, the URL information of JS files or picture file and corresponding data content in public offline number
According to the corresponding relation between the mark of bag;
It is described preferentially using configuration information in the public bag, judge in off-line data bag with the presence or absence of with it is described
The corresponding target data contents of target URL, including:
Corresponding target off-line data bag is determined in the html file access request for intercepting recently
After mark, target off-line data bag mark is recorded;
When kidnapping to other types file access request, using the global configuration information, the public affairs are judged
With in off-line data bag whether there is the corresponding target data contents of the target URL, if it is present
Using configuration information in the public bag, obtained from the public off-line data bag in corresponding target data
Hold;The other types file access request include CSS file access requests, JS file access requests or
Picture file access request;
If target data content corresponding with the target URL is not present in the public off-line data bag,
Then navigate to the corresponding target off-line data of the html file access request intercepted recently of the record
Bag mark, and using configuration information in the bag in the target off-line data bag, judge the target off-line data
It whether there is the corresponding target data contents of the target URL in bag.
7. method according to claim 3, it is characterised in that also include:
Singleton thread is created, the global configuration information is read into internal memory by the singleton thread, its
In, the singleton thread does not discharge with the closing of the page, in the global configuration information is resided in
In depositing, mesh corresponding with the target URL is being judged whether using global configuration information that described
When marking off-line data bag, the global configuration information is read from internal memory.
8. method according to claim 3, it is characterised in that the low low frequency of access frequency is counted offline
It is stored according to bag in remote server, but the global configuration information comprising URL and low frequency off-line data bag
Between corresponding relation, and preserve the download address information of the low frequency off-line data bag;
Methods described also includes:
If the URL correspondences low frequency off-line data bag for the pagefile access request being held as a hostage,
Judge to whether there is the low frequency off-line data bag in local disk;
Sub-line journey is downloaded if it does not exist, then opening, the download sub-line journey is used for according to the download address
The low frequency off-line data bag is downloaded by information, and is saved in the assigned catalogue of local disk;
It is robbed described in being obtained from the low frequency off-line data bag that the local disk local directory includes
The corresponding data content of pagefile access request held, and carry out the structure of browser response data.
9. method according to claim 3, it is characterised in that the high high frequency of access frequency is counted offline
Carry in the installation kit of application, and when the application is opened first, enter out of described installation kit according to bag
The assigned catalogue of local disk is saved in after row decompression;
During target data content corresponding from local disk acquisition target URL, including:
Judge whether the off-line data bag has decompressed to finish, if it is, by off-line data bag physically
Location is mapped to the assigned catalogue, otherwise, by the physical address map of off-line data bag to the installation kit.
10. method according to claim 3, it is characterised in that configuration information and complete in the bag
The URL information preserved in office's configuration information is for the relative path information in the URL of accession page file;
When judging whether the corresponding target data contents of the target URL, using in the target URL
Relative path information, with the global configuration information and bag in configuration information matched.
11. the method according to any one of claim 1 to 10, it is characterised in that also include:
If the target pages file access request correspondence new page is created, by target URL correspondences
Target data content, and configuration information is added in caching in the corresponding bag of place off-line data bag;
When kidnapping pagefile access request new in the page, judge whether deposited in caching according to URL
In corresponding data content, if it is present carrying out response data structure using the data content in caching;
If corresponding data content is not present in caching, sentenced using configuration information in the bag in the caching
It whether there is data content corresponding with the URL of new page file access request in dialysis line bag, if deposited
Data content then is being obtained from the off-line data bag in disk, and be added in caching;
When the page of the establishment is closed, the interior content related to the page will be cached and discharged.
12. the method according to any one of claim 1 to 10, it is characterised in that beforehand through after
The preset protocol class of system offer is provided, and rewrites Key Functions therein, custom protocol class is generated, and
Using being registered when being opened to the custom protocol class, to utilize custom protocol class correspondence
Intercepted with the target pages file access request of middle generation.
13. the method according to any one of claim 1 to 10, it is characterised in that in application
Before the target pages file access request of generation is intercepted, in addition to:
Determine the action type that the target pages file access request is performed to data;
If belonging to object run type, target pages file access request is intercepted.
14. the method according to any one of claim 1 to 10, it is characterised in that the page object
Face file access request includes HTTP request, and the response data includes http response, described to pass through mould
The mode for intending browser response builds pagefile access response data, including:
According to the length information of the suffix information in the target URL, and correspondence target data content,
Generate http response head;
According to the target URL, http response head, http response conditional code and http protocol
Version information, builds head response;
Response body is built according to the target data content;
The head response and response body are returned to using built-in browser control part.
15. a kind of page loading processing device, it is characterised in that including:
Off-line data bag provides unit, and for providing off-line data bag, the off-line data bag includes interior
Configuration information and many parts of data contents, every part of data content one pagefile to be visited of correspondence are described
Configuration information includes being used to access in the uniform resource position mark URL information and date of each pagefile in bag
Hold the corresponding relation between the relative path information in bag;
Judging unit, for kidnapping the target pages file access request produced in application, determines institute
The target URL information of target pages file access request is stated, and judges institute using configuration information in the bag
Off-line data bag is stated with the presence or absence of the corresponding target data content of the target URL information;
Response data construction unit, for if there is the target data content, then intercepting the page object
Face file access request, and using the target data content in the off-line data bag, pass through simulation browser
The mode of response builds pagefile access response data, and the response data is returned to using built-in
Browser control part.
16. device according to claim 15, it is characterised in that the off-line data bag provides single
Member specifically for:
According to the multiple business modules included in the application there is provided multiple off-line data bags, wherein, each
Pagefile to be visited in the same business module of off-line data bag correspondence, each off-line data bag correspondence is respective
Bag in configuration information;
Described device also includes:
Global configuration information provider unit, for providing global configuration information, the global configuration information includes
Corresponding relation between the mark of off-line data bag where URL information and corresponding data content;
The judging unit includes:
First judgment sub-unit, for being judged whether and the target using the global configuration information
The corresponding target off-line data bags of URL;
Second judgment sub-unit, for if it is present being configured using in the bag of the target off-line data bag
Information, judges to whether there is the corresponding number of targets of the target URL information in the target off-line data bag
According to content.
17. device according to claim 16, it is characterised in that the global configuration information is only wrapped
Include off-line data bag where html file access request URL information and corresponding data content mark it
Between corresponding relation, described device also includes:
Recording unit, it is corresponding for being determined in the html file access request for intercepting recently
After target off-line data bag mark, target off-line data bag mark is recorded;
Target off-line data bag determining unit, for when kidnapping to other types file access request, utilizing
The target off-line data bag mark of the record, determines the corresponding target of the other types file access request
Off-line data bag;The other types file access request includes CSS file access requests, JS files and visited
Ask request or picture file access request.
18. device according to claim 17, it is characterised in that the off-line data bag provides single
Member specifically for:
For CSS files public between different business module, JS files or picture file, there is provided independent
Public off-line data bag, the public off-line data bag includes configuration information and many numbers in public bag
According to content, one CSS file of every part of data content correspondence, JS files or picture file, the public bag
Interior configuration information includes the corresponding relation of URL information and data content in bag between relative path information;
The judging unit specifically for:
In abduction to CSS file access requests, JS file access requests or picture file request, preferentially
Using configuration information in the public bag, judge to whether there is and URL pairs of the target in off-line data bag
The target data content answered.
19. device according to claim 18, it is characterised in that in the global configuration information,
For the corresponding off-line data bag of specific business module, only including html file access request URL information
Corresponding relation between the mark of the off-line data bag where corresponding data content, for public off-line data
Bag, including CSS files, the URL information of JS files or picture file and corresponding data content it is public from
Corresponding relation between the mark of line packet;
The judging unit includes:
Subelement is recorded, for determining correspondence in the html file access request for intercepting recently
Target off-line data bag mark after, to the target off-line data bag mark record;
3rd judgment sub-unit, for when kidnapping to other types file access request, utilizing the overall situation
Configuration information, judges to whether there is the corresponding number of targets of the target URL in the public off-line data bag
According to content, if it is present using configuration information in the public bag, from the public off-line data bag
Obtain corresponding target data content;The other types file access request please including CSS file accesss
Ask, JS file access requests or picture file access request;
Locator unit, if for being not present and URL pairs of the target in the public off-line data bag
The target data content answered, then navigate to the html file access request intercepted recently of the record
Corresponding target off-line data bag mark, and using configuration information in the bag in the target off-line data bag, sentence
It whether there is the corresponding target data contents of the target URL in the disconnected target off-line data bag.
20. device according to claim 16, it is characterised in that also include:
Singleton thread creation unit, for creating singleton thread, is matched somebody with somebody the overall situation by the singleton thread
Confidence breath is read into internal memory, wherein, the singleton thread does not discharge with the closing of the page, so as to by institute
Global configuration information is stated to reside in internal memory, using global configuration information that described judge whether with
During the corresponding target off-line data bag of the target URL, the global configuration information is read from internal memory.
21. device according to claim 16, it is characterised in that the low low frequency of access frequency is offline
Packet is stored in remote server, but the global configuration information comprising URL and low frequency off-line data
Corresponding relation between bag, and preserve the download address information of the low frequency off-line data bag;
Described device also includes:
Local judging unit, if the URL correspondences of the pagefile access request for being held as a hostage are described
Low frequency off-line data bag, then judge to whether there is the low frequency off-line data bag in local disk;
Download unit, for downloading sub-line journey if it does not exist, then opening, the download sub-line journey is used for root
The low frequency off-line data bag is downloaded according to the download address information, and is saved in the finger of local disk
Determine catalogue;
Data content acquiring unit, the low frequency for including from the local disk local directory is offline
The corresponding data content of pagefile access request being held as a hostage described in being obtained in packet, and browsed
The structure of device response data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610154563.5A CN107203555B (en) | 2016-03-17 | 2016-03-17 | Page loading processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610154563.5A CN107203555B (en) | 2016-03-17 | 2016-03-17 | Page loading processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107203555A true CN107203555A (en) | 2017-09-26 |
CN107203555B CN107203555B (en) | 2021-04-30 |
Family
ID=59904114
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610154563.5A Active CN107203555B (en) | 2016-03-17 | 2016-03-17 | Page loading processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107203555B (en) |
Cited By (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107809491A (en) * | 2017-11-30 | 2018-03-16 | 北京小米移动软件有限公司 | The method for down loading and device of installation kit |
CN107911456A (en) * | 2017-11-17 | 2018-04-13 | 深圳泉眼体育运营管理有限公司 | Flow optimization method, device, terminal device and the storage medium of picture loading |
CN108121761A (en) * | 2017-11-24 | 2018-06-05 | 海尔优家智能科技(北京)有限公司 | A kind of Webpage loading method and device |
CN108228818A (en) * | 2017-12-29 | 2018-06-29 | 网易(杭州)网络有限公司 | Web page resources loading method and device, electronic equipment and storage medium |
CN108256014A (en) * | 2018-01-05 | 2018-07-06 | 阿里巴巴集团控股有限公司 | Page display method and device |
CN108491230A (en) * | 2018-01-24 | 2018-09-04 | 阿里巴巴集团控股有限公司 | Cartoon display method and device, client |
CN108762754A (en) * | 2018-04-26 | 2018-11-06 | 福建天泉教育科技有限公司 | A kind of method and terminal of H5 pages dynamic skin change in native applications |
CN108762807A (en) * | 2018-05-28 | 2018-11-06 | 北京酷我科技有限公司 | It is a kind of based on the H5 page parsing methods wrapped offline by force |
CN108846141A (en) * | 2018-07-11 | 2018-11-20 | 中国建设银行股份有限公司 | A kind of offline cache loading method and device |
CN108875009A (en) * | 2018-06-16 | 2018-11-23 | 王梅 | A kind of method and system for data file progress dynamic processing |
CN109101564A (en) * | 2018-07-16 | 2018-12-28 | 阿里巴巴集团控股有限公司 | A kind of method, apparatus and electronic equipment of page resource load simultaneously |
CN109324792A (en) * | 2018-10-09 | 2019-02-12 | 深圳点猫科技有限公司 | A kind of the route construction automatic method and electronic equipment of language based on programming |
CN109542853A (en) * | 2018-11-28 | 2019-03-29 | 深圳市瑞云科技有限公司 | A method of solving local rendering error |
CN109936605A (en) * | 2017-12-18 | 2019-06-25 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of loading interface data |
CN109962972A (en) * | 2018-12-25 | 2019-07-02 | 阿里巴巴集团控股有限公司 | A kind of offline package-restructuring method and system |
CN110018878A (en) * | 2018-01-09 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of distributed system data load method and device |
CN110417919A (en) * | 2019-08-29 | 2019-11-05 | 网宿科技股份有限公司 | A kind of flow abduction method and device |
CN110837396A (en) * | 2018-08-17 | 2020-02-25 | 青岛海尔多媒体有限公司 | Voice awakening method and device and computer storage medium |
CN110968365A (en) * | 2019-11-29 | 2020-04-07 | 中国银行股份有限公司 | Loading method and device |
CN111079048A (en) * | 2019-12-04 | 2020-04-28 | 北京达佳互联信息技术有限公司 | Page loading method and device |
CN111949342A (en) * | 2019-05-16 | 2020-11-17 | 新奥数能科技有限公司 | Page generation method and device |
CN113132811A (en) * | 2019-12-30 | 2021-07-16 | 深圳Tcl新技术有限公司 | Method for loading webpage and computer equipment |
CN114003471A (en) * | 2022-01-04 | 2022-02-01 | 深圳市明源云科技有限公司 | Page loading analysis method and device and readable storage medium |
CN114238417A (en) * | 2021-12-27 | 2022-03-25 | 四川启睿克科技有限公司 | Data caching method |
CN114422491A (en) * | 2021-12-20 | 2022-04-29 | 福州佳软软件技术有限公司 | Method and terminal for improving page acquisition efficiency |
CN114764484A (en) * | 2021-01-13 | 2022-07-19 | 武汉斗鱼网络科技有限公司 | Lazy loading implementation method and device, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101539911A (en) * | 2008-03-18 | 2009-09-23 | 盛大计算机(上海)有限公司 | Device and method for accelerating display of web page of browser |
CN101556609A (en) * | 2009-05-19 | 2009-10-14 | 杭州信杨通信技术有限公司 | Customer behavior analysis and service system based on web contents |
CN102375882A (en) * | 2011-09-19 | 2012-03-14 | 奇智软件(北京)有限公司 | Method, device and browser for rapidly accessing webpage |
CN102479250A (en) * | 2010-11-26 | 2012-05-30 | 中国科学院声学研究所 | Disk caching method for embedded browser |
US8832275B1 (en) * | 2012-03-30 | 2014-09-09 | Google Inc. | Offline web browser |
-
2016
- 2016-03-17 CN CN201610154563.5A patent/CN107203555B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101539911A (en) * | 2008-03-18 | 2009-09-23 | 盛大计算机(上海)有限公司 | Device and method for accelerating display of web page of browser |
CN101556609A (en) * | 2009-05-19 | 2009-10-14 | 杭州信杨通信技术有限公司 | Customer behavior analysis and service system based on web contents |
CN102479250A (en) * | 2010-11-26 | 2012-05-30 | 中国科学院声学研究所 | Disk caching method for embedded browser |
CN102375882A (en) * | 2011-09-19 | 2012-03-14 | 奇智软件(北京)有限公司 | Method, device and browser for rapidly accessing webpage |
US8832275B1 (en) * | 2012-03-30 | 2014-09-09 | Google Inc. | Offline web browser |
Cited By (39)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107911456A (en) * | 2017-11-17 | 2018-04-13 | 深圳泉眼体育运营管理有限公司 | Flow optimization method, device, terminal device and the storage medium of picture loading |
CN108121761A (en) * | 2017-11-24 | 2018-06-05 | 海尔优家智能科技(北京)有限公司 | A kind of Webpage loading method and device |
CN107809491A (en) * | 2017-11-30 | 2018-03-16 | 北京小米移动软件有限公司 | The method for down loading and device of installation kit |
CN109936605A (en) * | 2017-12-18 | 2019-06-25 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of loading interface data |
CN108228818A (en) * | 2017-12-29 | 2018-06-29 | 网易(杭州)网络有限公司 | Web page resources loading method and device, electronic equipment and storage medium |
CN108228818B (en) * | 2017-12-29 | 2021-01-12 | 网易(杭州)网络有限公司 | Webpage resource loading method and device, electronic equipment and storage medium |
CN108256014A (en) * | 2018-01-05 | 2018-07-06 | 阿里巴巴集团控股有限公司 | Page display method and device |
CN110018878B (en) * | 2018-01-09 | 2022-08-30 | 阿里巴巴集团控股有限公司 | Distributed system data loading method and device |
CN110018878A (en) * | 2018-01-09 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of distributed system data load method and device |
CN108491230A (en) * | 2018-01-24 | 2018-09-04 | 阿里巴巴集团控股有限公司 | Cartoon display method and device, client |
CN108762754A (en) * | 2018-04-26 | 2018-11-06 | 福建天泉教育科技有限公司 | A kind of method and terminal of H5 pages dynamic skin change in native applications |
CN108762807A (en) * | 2018-05-28 | 2018-11-06 | 北京酷我科技有限公司 | It is a kind of based on the H5 page parsing methods wrapped offline by force |
CN108762807B (en) * | 2018-05-28 | 2022-03-25 | 北京酷我科技有限公司 | H5 page analysis method based on strongly-separated solenoid |
CN108875009A (en) * | 2018-06-16 | 2018-11-23 | 王梅 | A kind of method and system for data file progress dynamic processing |
CN108846141A (en) * | 2018-07-11 | 2018-11-20 | 中国建设银行股份有限公司 | A kind of offline cache loading method and device |
CN108846141B (en) * | 2018-07-11 | 2022-05-24 | 中国建设银行股份有限公司 | Offline cache loading method and device |
CN109101564A (en) * | 2018-07-16 | 2018-12-28 | 阿里巴巴集团控股有限公司 | A kind of method, apparatus and electronic equipment of page resource load simultaneously |
CN110837396A (en) * | 2018-08-17 | 2020-02-25 | 青岛海尔多媒体有限公司 | Voice awakening method and device and computer storage medium |
CN109324792A (en) * | 2018-10-09 | 2019-02-12 | 深圳点猫科技有限公司 | A kind of the route construction automatic method and electronic equipment of language based on programming |
CN109324792B (en) * | 2018-10-09 | 2022-03-11 | 深圳点猫科技有限公司 | Automatic route construction method based on programming language and electronic equipment |
CN109542853A (en) * | 2018-11-28 | 2019-03-29 | 深圳市瑞云科技有限公司 | A method of solving local rendering error |
CN109962972B (en) * | 2018-12-25 | 2021-07-30 | 创新先进技术有限公司 | Offline packet reassembly method and system |
CN109962972A (en) * | 2018-12-25 | 2019-07-02 | 阿里巴巴集团控股有限公司 | A kind of offline package-restructuring method and system |
CN111949342A (en) * | 2019-05-16 | 2020-11-17 | 新奥数能科技有限公司 | Page generation method and device |
CN111949342B (en) * | 2019-05-16 | 2024-03-05 | 新奥数能科技有限公司 | Page generation method and device |
CN110417919B (en) * | 2019-08-29 | 2021-10-29 | 网宿科技股份有限公司 | Traffic hijacking method and device |
CN110417919A (en) * | 2019-08-29 | 2019-11-05 | 网宿科技股份有限公司 | A kind of flow abduction method and device |
CN110968365A (en) * | 2019-11-29 | 2020-04-07 | 中国银行股份有限公司 | Loading method and device |
CN110968365B (en) * | 2019-11-29 | 2023-08-29 | 中国银行股份有限公司 | Loading method and device |
CN111079048A (en) * | 2019-12-04 | 2020-04-28 | 北京达佳互联信息技术有限公司 | Page loading method and device |
CN111079048B (en) * | 2019-12-04 | 2023-11-28 | 北京达佳互联信息技术有限公司 | Page loading method and device |
CN113132811B (en) * | 2019-12-30 | 2023-08-01 | 深圳Tcl新技术有限公司 | Method for loading webpage and computer equipment |
CN113132811A (en) * | 2019-12-30 | 2021-07-16 | 深圳Tcl新技术有限公司 | Method for loading webpage and computer equipment |
CN114764484A (en) * | 2021-01-13 | 2022-07-19 | 武汉斗鱼网络科技有限公司 | Lazy loading implementation method and device, electronic equipment and storage medium |
CN114422491A (en) * | 2021-12-20 | 2022-04-29 | 福州佳软软件技术有限公司 | Method and terminal for improving page acquisition efficiency |
CN114422491B (en) * | 2021-12-20 | 2024-01-30 | 福州佳软软件技术有限公司 | Method and terminal for improving page acquisition efficiency |
CN114238417A (en) * | 2021-12-27 | 2022-03-25 | 四川启睿克科技有限公司 | Data caching method |
CN114003471B (en) * | 2022-01-04 | 2022-04-08 | 深圳市明源云科技有限公司 | Page loading analysis method and device and readable storage medium |
CN114003471A (en) * | 2022-01-04 | 2022-02-01 | 深圳市明源云科技有限公司 | Page loading analysis method and device and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107203555B (en) | 2021-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107203555A (en) | Page loading processing method and device | |
CN103150513B (en) | The method of the implantation information in interception application program and device | |
Subramanian et al. | Hands-On RESTful API Design Patterns and Best Practices: Design, develop, and deploy highly adaptable, scalable, and secure RESTful web APIs | |
CN102902805B (en) | A kind of page access method and apparatus | |
CN103425491B (en) | A kind of game engine | |
CN104216700B (en) | System of cloud-computing-based HTML5 application packaging, installation, unloading and operation method | |
CN108287839A (en) | A kind of page loading method and equipment | |
CN104903860B (en) | Third-party application scripting capabilities | |
CN103946833B (en) | The system and method for managing dedicated cache | |
CN108228818A (en) | Web page resources loading method and device, electronic equipment and storage medium | |
CN105027120B (en) | multi-page management method and device | |
US20120227060A1 (en) | Method and apparatus for widget-container hosting and generation | |
CN104714828A (en) | Methods and devices for installing and operating application | |
KR101991537B1 (en) | Autonomous network streaming | |
US20130024759A1 (en) | Shared Script Files in Multi-Tab Browser | |
US20140282032A1 (en) | Dynamically configuring user experiences with action uniform resource identifiers | |
CN106569856A (en) | Method and device of loading application view resource file | |
US10686821B2 (en) | Analysis of mobile applications | |
CN103685304A (en) | Method and system for sharing session information | |
CN101184105A (en) | Client appartus for updating data | |
CN103186739A (en) | Method for secure web browsing | |
CN104572968A (en) | Page updating method and device | |
CN105677646A (en) | Word stock generation method and system, and server | |
CN104468834A (en) | Method and device for processing Cookie data and browser client side | |
CN104079598B (en) | A kind of method and apparatus for realizing webpage collaborative browse |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |