CN106547806A - Page loading method and device - Google Patents
Page loading method and device Download PDFInfo
- Publication number
- CN106547806A CN106547806A CN201510621240.8A CN201510621240A CN106547806A CN 106547806 A CN106547806 A CN 106547806A CN 201510621240 A CN201510621240 A CN 201510621240A CN 106547806 A CN106547806 A CN 106547806A
- Authority
- CN
- China
- Prior art keywords
- html
- file
- target
- response type
- css
- 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
-
- 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
Abstract
The application provides a kind of page loading method and device.A kind of page loading method includes:Obtaining the page to be represented needs the facility environment information of response;Obtain the target HTML text and target CSS file with facility environment information match;Page rendering process is carried out according to target CSS file and target HTML text, to obtain the page to be represented.The application has matching HTML texts for distinct device environmental information, need to only load the HTML texts with facility environment information matches, and its data volume is relatively small, advantageously reduces the network traffics consumed in page loading procedure, lifts loading velocity.
Description
【Technical field】
The application is related to Internet technical field, more particularly to a kind of page loading method and device.
【Background technology】
Response type design theory be:The design and development of the page should be according to user behavior and facility environment
Information (operating system platform, screen size, screen orientation etc.) is responded accordingly and is adjusted.At present,
The realization of the response type page be by HTML (Hyper Text Mark-up Language,
HTML) meta attribute media are set, for for the different layer of different facility environment information definitions in file
Stacking style table (Cascading Style Sheets, CSS) pattern.
In above-mentioned implementation, all devices type shares a set of html file, in the html file
The middle adaptation code needed including many set CSS styles.Need to download whole HTML during browser loading page
File, according to the meta attribute media arranged in html file, monitors screen size, and then from service
Device obtains the CSS style being adapted with screen size;Which in html file is determined by the CSS style
A little HTML content blocks need to show which HTML content block needs to hide, finally represent to user and screen
The page that size is adapted.Due to needing to download whole html file, cause to expend more network traffics,
Drag slow loading velocity.
【The content of the invention】
The many aspects of the application provide a kind of page loading method and device, to reduce page loading procedure
The network traffics of consumption, improve loading velocity.
A kind of one side of the application, there is provided page loading method, including:
Obtaining the page to be represented needs the facility environment information of response;
Obtain the target HTML text and target CSS file with the facility environment information match;
Page rendering process is carried out according to the target CSS file and the target HTML text, to obtain
The page to be represented.
A kind of another aspect of the application, there is provided page loading method, including:
Receive the corresponding HTML texts of facility environment information of the page needs response to be represented that browser sends
Mark and CSS file identifications;
Obtain the HTML texts identify identified HTML texts as with the facility environment information phase
The target HTML text of matching, and obtain CSS files that the CSS file identifications are identified as with
The target CSS file of the facility environment information match;
The target HTML text and the target CSS file are returned to the browser, for described clear
Device of looking at renders the page to be represented.
A kind of another aspect of the application, there is provided page loading method, including:
Receive the facility environment information of the page needs response to be represented that browser sends;
Obtain the target HTML text and target CSS file with the facility environment information match;
The target HTML text and the target CSS file are returned to into the browser, for described
Browser renders go out the page to be represented.
A kind of another aspect of the application, there is provided page charger, realizes in browser, the page
Face charger includes:
Data obtaining module, needs the facility environment information of response for obtaining the page to be represented;
File acquisition module, for obtain with the target HTML text of the facility environment information match and
Target CSS file;
Rendering module, for carrying out page wash with watercolours according to the target CSS file and the target HTML text
Dye process, to obtain the page to be represented.
A kind of another aspect of the application, there is provided page charger, realizes in server, the page
Face charger includes:
Receiver module, the page to be represented for receiving browser transmission need the facility environment information pair of response
The HTML texts mark answered and CSS file identifications;
File acquisition module, for obtain the HTML texts identify identified HTML texts as with
The target HTML text of the facility environment information match, and obtain the CSS file identifications and identified
CSS files as the target CSS file with the facility environment information match;
Sending module, for returning the target HTML text and target CSS to the browser
File, so that the browser renders go out the page to be represented.
A kind of another aspect of the application, there is provided page charger, realizes in server, the page
Face charger includes:
Receiver module, the page to be represented for receiving browser transmission need the facility environment information of response;
File acquisition module, for obtain with the target HTML text of the facility environment information match and
Target CSS file;
Sending module, it is described clear for the target HTML text and the target CSS file are returned to
Look at device, so that the browser renders go out the page to be represented.
In this application, obtaining the page to be represented needs the facility environment information of response, then obtains and the equipment
Target HTML text and target CSS file that environmental information matches, according to equipment annular information phase
The target HTML text and target CSS file matched somebody with somebody carries out page rendering process, to obtain the page to be represented,
Realize the loading of the response type page.In this application, have matching for distinct device environmental information
HTML texts, need to only load the HTML texts with facility environment information matches, in the application
HTML texts be different from prior art in all devices environmental information share allow for set suitable for various
The html file of standby environment, its data volume are relatively small, advantageously reduce and consume in page loading procedure
Network traffics, lifted loading velocity.
【Description of the drawings】
For the technical scheme being illustrated more clearly that in the embodiment of the present application, below will be to embodiment or existing skill
Accompanying drawing to be used needed for art description is briefly described, it should be apparent that, drawings in the following description
It is some embodiments of the present application, for those of ordinary skill in the art, is not paying creative work
Property on the premise of, can be obtaining other accompanying drawings according to these accompanying drawings.
The schematic flow sheet of the page loading method that Fig. 1 is provided for one embodiment of the application;
The schematic flow sheet of the page loading method that Fig. 2 is provided for another embodiment of the application;
The schematic flow sheet of the page loading method that Fig. 3 is provided for the another embodiment of the application;
The structural representation of the page charger that Fig. 4 is provided for the another embodiment of the application;
The structural representation of the page charger that Fig. 5 is provided for the another embodiment of the application;
The structural representation of the page charger that Fig. 6 is provided for the another embodiment of the application.
【Specific embodiment】
To make the purpose, technical scheme and advantage of the embodiment of the present application clearer, below in conjunction with the application
Accompanying drawing in embodiment, is clearly and completely described to the technical scheme in the embodiment of the present application, it is clear that
Described embodiment is some embodiments of the present application, rather than the embodiment of whole.Based in the application
Embodiment, those of ordinary skill in the art obtained under the premise of creative work is not made it is all its
His embodiment, belongs to the scope of the application protection.
Expend more for prior art network traffics present in response type page loading scheme, loading speed
The problems such as degree is slower, the application provides a solution, and cardinal principle is:It is difference in server side
Facility environment configures matched HTML texts and CSS files, HTML texts and CSS files
With one-to-one relationship.Compared with prior art, not only have oneself corresponding CSS literary for distinct device environment
Part, but also there is oneself corresponding html file, no longer as prior art, all devices environment is common
Use a set of html file.As can be seen here, the html file of the application need to only include and setting which matches
Standby content needed for environment, it is not necessary to many set CSS styles are imbedded as html file of the prior art
Adaptation code, it is not required that including the content needed for miscellaneous equipment environment, its data volume is relatively small.Base
In this, in response type page loading procedure, it is possible to reduce the network traffics for being consumed, loading velocity is lifted.
The facility environment information of the application mainly includes:Device type (media type) information and device characteristics
At least one of (media feature) information.Wherein, device type information mainly includes:The operation of equipment
At least one of engine kernel of system platform and browser.Operating system platform can be linux, unix,
Mac or windows etc.;The engine kernel of browser can be Tridend kernels, Gecko kernels or
Person's Webkit kernels etc..Equipment characteristic information mainly includes:Browser window size (include window width and
/ or window height), the direction (e.g. vertical or horizontal) of browser window, browser window is in length and breadth
Than, the width value of device screen resolution, the height value of device screen resolution, and device screen it is vertical
At least one of horizontal ratio.
In view of operating system platform, the engine kernel of browser, device type and device screen in length and breadth
The information such as ratio typically have various ways, and the combination of the various ways of multiple information causes the species of facility environment
A lot.If the HTML texts and CSS files for matching is respectively configured for each facility environment, undoubtedly
In response effect be it is optimal, but exploitation and safeguard that the cost of HTML texts and CSS files can be very high.
Therefore, a kind of more preferred implementation is:Facility environment is classified, is divided into several big class, be every class
HTML texts and CSS files that facility environment configuration matches.The present embodiment is not limited to facility environment
Mode classification, for example, can classify according to terminal type, for example, be divided into cell phone type facility environment information, individual
The computer facility environment information of people and panel computer kind equipment environmental information etc.;Or, it is also possible to according to behaviour
Make system platform and screen size to divide, operating system platform and screen size identical facility environment are believed
Breath is divided into a class;Etc..
The application is each facility environment or a set of HTML texts of every kind equipment environment maintenance and CSS files
Scheme, in addition to above-mentioned beneficial effect, its later maintenance is relatively flexible, and cost is relatively low.Example
Such as, it is relatively flexible when CSS files are changed in the later stage, change wherein a set of CSS files and do not interfere with other
CSS files.In the same manner, when HTML texts are changed in the later stage, only need to be corresponding for the HTML texts
CSS files are tested, it is not necessary to test other CSS files.In addition, HTML is covered the application more
Text and CSS files actually correspond to the same page, and user can be visited using same URL link
Ask, it is ensured that user data is got ready.Furthermore, cover HTML texts more and can use same HTML heads
Information, so for search engine optimization (the Search Engine that some are realized based on HTML header informations
Optimization, SEO) for, it is ensured that SEO unifies.Certainly, many set HTML of the application
Text can also use different HTML header informations, such browser obtain phase to server request
The HTML header informations answered.
The application following examples provide several method flows that can realize above-mentioned principle.Furthermore, it is contemplated that
It will be appreciated by those skilled in the art that page rendering will be completed to also need to obtain in addition to HTML texts
HTML header informations, therefore in the application following examples, to relevant acquisition HTML header informations not
Do excessive explanation.
The schematic flow sheet of the page loading method that Fig. 1 is provided for one embodiment of the application.As shown in figure 1,
The method includes:
101st, obtaining the page to be represented needs the facility environment information of response.
102nd, obtain target HTML text and the target CSS file matched with the said equipment environmental information.
103rd, page rendering process is carried out according to above-mentioned target CSS file and above-mentioned target HTML text,
To obtain the page to be represented.
The present embodiment provides a kind of page loading method, to the loading for realizing the response type page, while reducing
The network traffics of consumption, lift loading velocity.The method can be performed by browser, and the browser can be
The browser being applied on various facility environments, for example, could be for the browser in PC, be used for
Browser on mobile phone, for browser on panel computer etc..
In actual applications, when user needs to access the page of certain URL link sensing, such as user's handss
Move and URL is input in the address field of browser, or user clicks on link on certain page etc., can be to clear
Device of looking at sends access request.Access request of the browser according to user, it is determined that needing to load respective page.Its
In, need the page for accessing to be referred to as the page to be represented user.
In the present embodiment, browser is it is determined that need to load after the page is represented, obtaining the page to be represented needs
Facility environment information to be responded, so that content of pages and layout can adapt to the facility environment.
For the page to be represented, there is html file the page to need the content for showing, mainly
Text (body) part of html file.Html file except HTML texts, also including HTML heads
Portion (head) information.And CSS files are mainly used in limiting the pattern of the page to be represented.Based on this, obtaining
After taking the facility environment information that the page to be represented needs response, browser is obtained and the said equipment environmental information
The target HTML text for matching and target CSS file;Then, according to target CSS file and target
HTML texts carry out page rendering process, to obtain the page to be represented.Specifically, browser uses target
CSS files are rendered to target html file, to obtain the page to be represented.Wherein, target HTML
Text refers to the body part in the html file for constituting the page to be presented.
As the target html file in the present embodiment need to only be included needed for the facility environment matched with which
Content, it is not necessary to the adaptation code of many set CSS styles is imbedded as html file of the prior art,
Also without including the content needed for miscellaneous equipment environment, its data volume is relatively small, therefore, in response type
In page loading procedure, it is possible to reduce the network traffics for being consumed, loading velocity is lifted.
Due to current embodiment require that first obtaining the page to be represented needs the facility environment information of response, then foundation
The facility environment information removes to obtain target HTML text and the target CSS file for matching, so can not picture
Prior art obtains facility environment information like that by meta attributes are arranged in html file.For
The problem, the present embodiment is given a kind of monitors script obtaining the embodiment party of facility environment information by response type
Formula.
Specifically, browser can run response type monitoring script, with the window object of access browser;From
In window object, facility environment information is read.The response type monitoring script main purpose is realized to browser
The access of window object simultaneously therefrom reads required facility environment information.Every script generation that can realize the function
Code is applied to the present embodiment, for example, can write the response type with javascript language and monitor script.
Optionally, browser can monitor script in the above-mentioned response type of local maintenance.Using which, browse
Device obtains response type monitoring script by locally, and its acquisition speed is very fast, is conducive to improving acquisition equipment ring
The efficiency of environment information.
Optionally, as each browser is required to monitor script using the response type, therefore can be in server
Safeguard that a response type monitors script, can so save the local memory space of code cost and browser.
Based on this, browser can monitor foot to server request response type before operation response type monitoring script
This.Detailed process is as follows:
Browser sends accessing page request to server, to ask the HTML header informations of the page to be represented;
Server receives the accessing page request that browser sends, and returns HTML head to browser according to the request
Information;The HTML header informations include that response type monitors the mark of script;
The HTML header informations that browser the reception server is returned, obtain from the HTML header informations and ring
Formula is answered to monitor the mark of script;
Browser sends script to server and obtains request, and the script obtains request and carries response type monitoring foot
This mark, monitors script with acquisition request response type;Server receives the script acquisition of browser transmission please
Ask, therefrom obtain the mark that response type monitors script, the mark of script is monitored according to the response type, to browsing
Device returns response type monitoring script;
The response type monitoring script that browser the reception server is returned according to the mark that response type monitors script.
Monitored in the embodiment of script from server acquisition response type based on above-mentioned a kind of, above-mentioned HTML
Header information also includes:The mark of the first response type configuration file, the first response type configuration file include HTML
Text mark, the corresponding relation between CSS file identifications and facility environment information.Wherein, HTML texts
Identify for identifying HTML texts, different HTML texts have different HTML texts marks;CSS
File identification is used to identify CSS files, and different CSS files have different CSS file identifications.It is described
The storage form of corresponding relation can be with form as shown in table 1 below, i.e. HTML texts mark, CSS files
Mark and facility environment information three directly correspond to.
Table 1
HTML texts are identified | CSS file identifications | Facility environment information |
html_1 | css_1 | Environmental information _ 1 |
… | … | … |
The storage form of above-mentioned corresponding relation can also be the form as shown in table 2 below and table 3, i.e. HTML
Text identifies and corresponding relation is set up and facility environment both information between, and CSS file identifications are believed with facility environment
Breath sets up corresponding relation between the two.As HTML texts mark has corresponding relation with CSS file identifications,
So HTML texts identify corresponding facility environment information, identify to CSS files with the HTML texts
The corresponding facility environment information that mark is answered is identical, based on this, also just establishes the corresponding relation between three.
Table 2
HTML texts are identified | Facility environment information |
html_1 | Environmental information _ 1 |
… | … |
Table 3
CSS file identifications | Facility environment information |
css_1 | Environmental information _ 1 |
… | … |
Based on above-mentioned, browser, can be with to service in addition to server request response type monitoring script
Device asks the first response type configuration file.Specifically, browser sends the request of the first file acquisition to server,
The request of first file acquisition includes the mark of the first response type configuration file, is matched somebody with somebody with the first response type of acquisition request
Put file;Server receives the first file acquisition request that browser sends, and the first sound is obtained from the request
The mark of formula configuration file is answered, the first response type configuration file is obtained according to the mark and browser is returned to;
The first response type configuration file that browser the reception server is returned.
Based on the target that the first response type configuration file, a kind of acquisition are matched with the said equipment environmental information
The embodiment of HTML texts and target CSS file includes:
Carried out in the corresponding relation that the first response type configuration file includes according to the said equipment environmental information
Match somebody with somebody, to obtain HTML texts mark corresponding with the said equipment environmental information and CSS file identifications;
Above-mentioned HTML texts are obtained from server identified HTML texts are identified as target HTML text
Part, and CSS files that above-mentioned CSS file identifications are identified are obtained as target CSS file from server.
Optionally, browser obtains the process of target HTML text from server, obtains mesh with from server
The process of mark CSS files can be same process.Specifically, browser can send an information to server
Request is obtained, HTML texts mark and CSS file identifications are carried in the information acquisition request, to ask
Obtain target HTML text and target CSS file;Server receives the information acquisition request that browser sends,
HTML texts mark and CSS file identifications are therefrom obtained, obtains what HTML texts were identified
HTML texts (i.e. target HTML text), and obtain the CSS files identified by CSS file identifications
(i.e. target CSS file), returns to after being packaged to target HTML text and target CSS file
Browser;Target HTML text and target CSS file after the encapsulation that browser the reception server is returned,
Target HTML text and target CSS file are parsed therefrom.
Optionally, browser obtains the process of target HTML text from server, obtains mesh with from server
The process of mark CSS files can be two different processes.Specifically, browser can be sent to server
HTML obtains request, carries HTML texts mark, with acquisition request mesh in the HTML obtains request
Mark HTML texts;Server receives the HTML acquisition requests that browser sends, and is therefrom just obtaining HTML
Text mark, obtains HTML texts and identifies identified HTML texts (i.e. target HTML text), right
Target HTML text returns to browser after being packaged;After the encapsulation that browser the reception server is returned
Target HTML text, therefrom parses target HTML text.In the same manner, browser can be sent out to server
Send a CSS to obtain request, CSS file identifications are carried in the CSS obtains request, with acquisition request mesh
Mark CSS files;Server receives the CSS acquisition requests that browser sends, and therefrom obtains CSS files-designateds
Know, obtain the CSS files (i.e. target CSS file) identified by CSS file identifications, to target CSS
File returns to browser after being packaged;Target CSS text after the encapsulation that browser the reception server is returned
Part, therefrom parses target CSS file.
What deserves to be explained is, above-mentioned browser monitors the process of script to server request response type, and to clothes
It can be same process, or different processes that business device asks the process of the first response type configuration file.
It is in another kind is based on the above-mentioned embodiment for obtaining response type monitoring script from server, above-mentioned
HTML header informations also include:The mark of the second response type configuration file, the second response type configuration file bag
Include the corresponding relation between HTML texts mark and facility environment information.Wherein, HTML texts mark is used
In mark HTML texts, different HTML texts have different HTML texts marks.The correspondence is closed
The storage form of system can be as shown in table 2 form.Wherein, HTML texts are had with facility environment information
Corresponding relation, between HTML texts and CSS files have corresponding relation, it is meant that CSS files with set
Standby environmental information has corresponding relation, and the corresponding CSS files of target HTML text are to be believed with facility environment
The target CSS file of manner of breathing matching.In this embodiment, can carry right with which in HTML texts
The CSS file identifications of the CSS files answered, so as to embody HTML texts mark and CSS file identifications
Between corresponding relation.
Based on above-mentioned, browser, can be with to service in addition to server request response type monitoring script
Device asks the second response type configuration file.Specifically, browser sends the request of the second file acquisition to server,
The request of second file acquisition includes the mark of the second response type configuration file, is matched somebody with somebody with the second response type of acquisition request
Put file;Server receives the second file acquisition request that browser sends, and the second sound is obtained from the request
The mark of formula configuration file is answered, the second response type configuration file is obtained according to the mark and browser is returned to;
The second response type configuration file that browser the reception server is returned.
Based on the target that the second response type configuration file, a kind of acquisition are matched with the said equipment environmental information
The embodiment of HTML texts and target CSS file includes below scheme:
Carried out in the corresponding relation that the second response type configuration file includes according to the said equipment environmental information
Match somebody with somebody, to obtain HTML texts mark corresponding with the said equipment environmental information;
Above-mentioned HTML texts are obtained from server identified HTML texts are identified as target HTML text
Part;
The CSS file identifications carried in obtaining target HTML text;
CSS files that above-mentioned CSS file identifications are identified are obtained as target CSS file from server.
It is above-mentioned to obtain the identified HTML texts of above-mentioned HTML texts mark as target from server
The process of html file includes:Browser can send HTML to server and obtain request, in the HTML
HTML texts mark is carried in obtaining request, with acquisition request target HTML text;Server receives clear
The HTML that device of looking at sends obtains request, therefrom obtains HTML texts mark, obtains HTML texts mark
The HTML texts (i.e. target HTML text) for being identified, return after being packaged to target HTML text
Back to browser;Target HTML text after the encapsulation that browser the reception server is returned, therefrom parses
Target HTML text.
In the same manner, the above-mentioned CSS files identified from the above-mentioned CSS file identifications of server acquisition are used as target
The process of CSS files includes:Browser can send a CSS to server and obtain request, in the CSS
CSS file identifications are carried in obtaining request, with acquisition request target CSS file;Server is received and is browsed
The CSS that device sends obtains request, therefrom obtains CSS file identifications, obtains CSS file identifications and is identified
CSS files (i.e. target CSS file), return to browser after being packaged to target CSS file;
Target CSS file after the encapsulation that browser the reception server is returned, therefrom parses target CSS file.
What deserves to be explained is, above-mentioned browser monitors the process of script to server request response type, and to clothes
It can be same process, or different processes that business device asks the process of the second response type configuration file.
What deserves to be explained is, above two obtains the embodiment of target HTML text and target CSS file
Can be considered asynchronous response scheme.In asynchronous response scheme, browser can be with monitoring device environmental information
Matched in response type configuration file, to determine corresponding HTML texts mark and CSS files-designateds in real time
Know, and by target HTML text and target CSS file being obtained with server interaction, be adapted to loading interaction
The relative complex page of process, can reduce user's loading in use by way of by screen loading
Perceive.
In another optional embodiment, target HTML that above-mentioned acquisition is matched with the said equipment environmental information
The implementation process of text and target CSS file includes:Facility environment information is sent to server by browser,
So that server is according to facility environment acquisition of information target HTML text and target CSS file;Receive service
Target HTML text and target CSS file that device is returned.
Specifically, facility environment information only need to be sent to server by browser, realize target by server
The acquisition of HTML texts and target CSS file.For server, the equipment ring that browser sends is received
Environment information, according to the facility environment information, in the correspondence that the first response type configuration file of local maintenance includes
Matched in relation, to obtain HTML texts mark corresponding with the facility environment information and CSS files
Mark;Obtain the HTML texts identified HTML texts are identified as target HTML text, and
CSS files that the CSS file identifications are identified are obtained as target CSS file;By target HTML
Text and target CSS file return to browser.First response type configuration file include HTML texts mark,
Corresponding relation between CSS file identifications and facility environment information.The storage formization of the corresponding relation can be such as
Shown in table 1, or as shown in table 2 and table 3.
Wherein, server returns the process of target HTML text to browser, returns target with to browser
The process of CSS files can be same process, or different processes.In addition, server can be right
Target HTML text and target CSS file return to browser after being packaged.Furthermore, server may be used also
To obtain the HTML header informations of the page to be represented, after target HTML text is obtained, can be to HTML
Header information and target HTML text carry out assembling and form html file, and return HTML to browser
File;Accordingly, browse the html file of implement body the reception server return.
In another optional embodiment, target HTML that above-mentioned acquisition is matched with the said equipment environmental information
The implementation process of text and target CSS file includes:Facility environment information is sent to server by browser,
So that server is according to facility environment acquisition of information target HTML text;The target that the reception server is returned
HTML texts;The CSS file identifications carried in obtaining target HTML text;CSS is obtained from server
The CSS files identified by file identification are used as target CSS file.
Specifically, facility environment information is sent to server by browser.For server, reception is browsed
The facility environment information that device sends, according to the facility environment information, configures in the second response type of local maintenance
Matched in the corresponding relation that file includes, to obtain HTML texts corresponding with the facility environment information
Mark;Obtain the HTML texts identified HTML texts are identified as target HTML text;Will
Target HTML text returns to browser.The target HTML text that browser the reception server is returned, from
CSS file identifications are obtained in middle target HTML text, what is carried in target HTML text is the target
The mark of the corresponding CSS files of HTML texts;CSS is sent to server and obtains request, and in request
Middle carrying CSS file identifications, with acquisition request target CSS file.Server receives what browser sent
CSS obtains request, therefrom obtains CSS file identifications, obtains the CSS identified by the CSS file identifications
File is as target CSS file and returns to browser.Target CSS that browser the reception server is returned
File.Wherein, the second response type configuration file is included between HTML texts mark and facility environment information
Corresponding relation.The storage formization of the corresponding relation can be as shown in table 2.
Wherein, server can return to clear after being packaged to target HTML text and target CSS file
Look at device.In addition, server can also obtain the HTML header informations of the page to be represented, target HTML is being obtained
After text, assembling can be carried out to HTML header informations and target HTML text and form html file,
And html file is returned to browser;Accordingly, the HTML for browsing the return of implement body the reception server is literary
Part.
What deserves to be explained is, above two obtains the embodiment of target HTML text and target CSS file
Can be considered sync response scheme.In sync response scheme, due to obtaining facility environment information in browser one
Side, and response type configuration file is in server side, thus cannot determine in real time corresponding HTML texts mark and
CSS file identifications, therefore suitable those interactions of loading are less complicated, it is not necessary to frequently monitoring users are grasped
Make the page affected on page layout.
The schematic flow sheet of the page loading method that Fig. 2 is provided for another embodiment of the application.As shown in Fig. 2
The method includes:
201st, receive the corresponding HTML of facility environment information of the page needs response to be represented that browser sends
Text is identified and CSS file identifications.
202nd, obtain above-mentioned HTML texts identify identified HTML texts as with the said equipment environment
The target HTML text of information match, and obtain the CSS files identified by above-mentioned CSS file identifications
As the target CSS file matched with the said equipment environmental information.
203rd, target HTML text and target CSS file are returned to browser, so that browser renders go out
The above-mentioned page to be represented.
The present embodiment provides a kind of page loading method, to the loading for realizing the response type page, while reducing
The network traffics consumed in loading procedure, lift loading velocity.The method can be performed by server.
Specifically, browser obtains the page to be represented needs the facility environment information of response, and acquisition to set with this
For the corresponding HTML texts mark of environmental information and CSS file identifications.The process specifically can be found in above-mentioned reality
The description in example is applied, be will not be described here.
Browser identifies the HTML texts of acquisition and CSS file identifications are sent to server;Server connects
Receive HTML texts mark and CSS file identifications that browser sends;Obtain HTML texts to be marked
The HTML texts of knowledge are used as the target HTML text with facility environment information match, and obtain CSS
The CSS files identified by file identification are used as the target CSS file with facility environment information match;Will
Target HTML text and target CSS file return to browser, so that browser renders go out the page to be represented.
Wherein, server can be returned again to after being packaged to target HTML text and target CSS file to browsing
Device.In addition, server returns the process of target HTML text to browser, target is returned with to browser
The process of CSS files can be same process, or different processes.
In an optional embodiment, browser sends accessing page request to server;Server receives clear
The accessing page request that device of looking at sends, returns the HTML of the page to be represented according to accessing page request to browser
Header information, the HTML header informations include that response type monitors the mark of script;Browser the reception server
The HTML header informations of transmission, obtain the mark that response type monitors script from the HTML header informations,
Script is sent to server and obtains request, the script obtains request and carries the mark that response type monitors script;
Server receives the script acquisition request that browser sends, and therefrom obtains the mark that response type monitors script, root
The mark of script is monitored according to response type, response type monitoring script is returned to browser, so that browser passes through institute
State response type monitoring script and obtain facility environment information.
In an optional embodiment, above-mentioned HTML header informations also include:First response type configuration file
Mark, the first response type configuration file includes HTML texts mark, CSS file identifications and facility environment
Corresponding relation between information.
Based on this, browser, can be with from the HTML header informations after HTML header informations are received
The mark of the first response type configuration file being obtained, and the request of the first file acquisition being sent to server, this first
File acquisition request includes the mark of the first response type configuration file;Server receives first that browser sends
File acquisition is asked, and therefrom obtains the mark of the first response type configuration file, according to the first response type configuration text
The mark of part, returns the first response type configuration file to browser, so that browser determines the said equipment environment
The corresponding html file mark of information and CSS file identifications.Wherein, browser is matched somebody with somebody based on the first response type
Put the process that file determines html file mark corresponding with the said equipment environmental information and CSS file identifications
Previous embodiment is can be found in, be will not be described here.
In an optional embodiment, above-mentioned HTML header informations also include:Second response type configuration file
Mark, the second response type configuration file include HTML texts mark and facility environment information between correspondence
Relation.
Based on this, browser, can be with from the HTML header informations after HTML header informations are received
The mark of the second response type configuration file being obtained, and the request of the second file acquisition being sent to server, this second
File acquisition request includes the mark of the second response type configuration file;Server receives second that browser sends
File acquisition is asked, and therefrom obtains the mark of the second response type configuration file, according to the second response type configuration text
The mark of part, returns the second response type configuration file to browser, so that browser determines the said equipment environment
The corresponding html file mark of information and CSS file identifications.Wherein, browser is matched somebody with somebody based on the second response type
Put the process that file determines html file mark corresponding with the said equipment environmental information and CSS file identifications
Previous embodiment is can be found in, be will not be described here.
In the present embodiment, server is cooperated with browser, according to the HTML texts that browser is provided
Mark and CSS file identifications are that browser obtains the target HTML text with its facility environment information match
And target CSS file so that browser can realize the loading of the response type page, while reducing the net for consuming
Network flow, improves loading velocity.In addition, the embodiment is adapted to load the relative complex page of interaction,
User's loading in use can be reduced to perceive by way of by screen loading.
The schematic flow sheet of the page loading method that Fig. 3 is provided for the another embodiment of the application.As shown in figure 3,
The method includes:
301st, receive the facility environment information of the page needs response to be represented that browser sends.
302nd, obtain target HTML text and the target CSS file matched with the said equipment environmental information.
303rd, target HTML text and target CSS file are returned to into browser, for browser renders
Go out the above-mentioned page to be represented.
The present embodiment provides a kind of page loading method, to the loading for realizing the response type page, while reducing
The network traffics consumed in loading procedure, lift loading velocity.The method can be performed by server.
Specifically, browser obtains the page to be represented needs the facility environment information of response.The process specifically may be used
Referring to the description in above-described embodiment, will not be described here.
Acquired facility environment information is sent to server by browser, for example can be by facility environment information
Carry server is sent in a request;Server receives the facility environment information that browser sends;Then,
Obtain the target HTML text and target CSS file with the facility environment information match;By target
HTML texts and target CSS file return to browser, so that browser renders go out the page to be represented.
Wherein, server can return again to after being packaged to target HTML text and target CSS file to
Browser.In addition, server returns the process of target HTML text to browser, and return to browser
The process of target CSS file can be same process, or different processes.Furthermore, server is also
The HTML header informations of the page to be represented can be obtained, to HTML header informations and target HTML text
Carry out assembling and form html file, the html file is returned to into browser.For browser, tool
The html file that body the reception server is returned.
In an optional embodiment, server is in local maintenance the first response type configuration file, the first response
Formula configuration file includes HTML texts mark, the correspondence pass between CSS file identifications and facility environment information
System.Based on this, what server can include in the first response type configuration file according to the said equipment environmental information
Matched in corresponding relation, with obtain corresponding with the said equipment environmental information HTML texts identify and
CSS file identifications;Afterwards, the HTML texts are obtained identified HTML texts are identified as target
HTML texts, and CSS files that the CSS file identifications are identified are obtained as target CSS file.
In another optional embodiment, server is in local maintenance the second response type configuration file, the second sound
The formula configuration file of answering includes the corresponding relation between HTML texts mark and facility environment information.Based on this,
Server can enter in the corresponding relation that the second response type configuration file includes according to the said equipment environmental information
Row matching, to obtain HTML texts mark corresponding with the said equipment environmental information;Obtain the HTML
Text identifies identified HTML texts as target HTML text, and the target HTML text is returned
To browser.
In the above-described embodiment, the CSS of corresponding CSS files is carried in each HTML text
File identification.That is, the CSS that its corresponding CSS file is carried in target HTML text is literary
Part is identified.Due to target HTML text it is corresponding with facility environment information, so target HTML text pair
The CSS files answered are the target CSS file with facility environment information match.Based on this, browser
After the target HTML text for receiving server return, can obtain from target HTML text
The CSS file identifications are sent to server by CSS file identifications;Server receive browser send from
The CSS file identifications obtained in target HTML text;Server obtains the CSS file identifications and is identified
CSS files as target CSS file, target CSS file is returned to into browser.
In the present embodiment, server is cooperated with browser, according to the facility environment letter that browser is provided
Target HTML text and target CSS file with its facility environment information match for browser acquisition are ceased,
Enable browser to realize the loading of the response type page, while reducing the network traffics for consuming, improve loading
Speed.In addition, suitable those interactions of loading of the embodiment are less complicated, it is not necessary to frequent monitoring users
Operate the page affected on page layout.
It should be noted that for aforesaid each method embodiment, in order to be briefly described, therefore which is all stated
For a series of combination of actions, but those skilled in the art should know, the application is by described
The restriction of sequence of movement, because according to the application, some steps can adopt other orders or while carry out.
Secondly, those skilled in the art should also know, embodiment described in this description belongs to be preferable to carry out
Example, necessary to involved action and module not necessarily the application.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, without detailed in certain embodiment
The part stated, may refer to the associated description of other embodiment.
The structural representation of the page charger that Fig. 4 is provided for the another embodiment of the application.The page is loaded
Device is realized in can be located at browser, as shown in figure 4, the device includes:Data obtaining module 41, file
Acquisition module 42 and rendering module 43.
Data obtaining module 41, needs the facility environment information of response for obtaining the page to be represented.
File acquisition module 42, for obtaining the facility environment information phase obtained with data obtaining module 41
The target HTML text matched somebody with somebody and target CSS file.
Rendering module 43, for the target CSS file that obtained according to file acquisition module 42 and target HTML
Text carries out page rendering process, to obtain the page to be represented.
In an optional embodiment, data obtaining module 41 is particularly used in:
Operation response type monitoring script, with the window object of access browser;
From window object, reading the page to be represented needs the facility environment information of response.
In an optional embodiment, data obtaining module 41 is additionally operable to:Operation response type monitoring script it
Before, response type monitoring script is obtained from server.Specifically, data obtaining module 41 is used for:
Accessing page request is sent to server, to ask the HTML header informations of the page to be represented;
The HTML header informations that the reception server is returned, the HTML header informations include response type monitoring foot
This mark;
Script is sent to server and obtains request, script obtains request and carries the mark that response type monitors script;
The response type monitoring script that the reception server is returned according to the mark that response type monitors script.
In an optional embodiment, above-mentioned HTML header informations also include:First response type configuration file
Mark, the first response type configuration file includes HTML texts mark, CSS file identifications and facility environment
Corresponding relation between information.
Based on above-mentioned, data obtaining module 41 is additionally operable to:The first response type configuration file is obtained from server.
Specifically, data obtaining module 41 is used for:
The request of the first file acquisition is sent to server, the request of the first file acquisition includes that the first response type is configured
The mark of file, with acquisition request the first response type configuration file;
The first response type configuration file that the reception server is returned.
Accordingly, file acquisition module 42 is in target HTML text and target CSS file, concrete to use
In:
Matched in the corresponding relation that the first response type configuration file includes according to facility environment information, with
Obtain HTML texts mark corresponding with facility environment information and CSS file identifications;
HTML texts are obtained from server identified HTML texts are identified as target html file,
And the CSS files that identified of CSS file identifications are obtained as target CSS file from server.
In another optional embodiment, above-mentioned HTML header informations also include:Second response type configuration text
The mark of part, the second response type configuration file include right between HTML texts mark and facility environment information
Should be related to.
Based on above-mentioned, data obtaining module 41 is additionally operable to:The second response type configuration file is obtained from server.
Specifically, data obtaining module 41 is used for:
The request of the second file acquisition is sent to server, the request of the second file acquisition includes that the second response type is configured
The mark of file, with acquisition request the second response type configuration file;
The second response type configuration file that the reception server is returned.
Accordingly, file acquisition module 42 is in target HTML text and target CSS file, concrete to use
In:
Matched in the corresponding relation that the second response type configuration file includes according to facility environment information, with
Obtain HTML texts mark corresponding with facility environment information;
HTML texts are obtained from server identified HTML texts are identified as target HTML text;
The CSS file identifications carried in obtaining target HTML text;
The CSS files that identified of CSS file identifications are obtained as target CSS file from server.
In another optional embodiment, file acquisition module 42 is in target HTML text and target CSS
During file, specifically for:
Facility environment information is sent to into server, so that server is according to facility environment acquisition of information target
HTML texts and target CSS file;
Target HTML text and target CSS file that the reception server is returned.
In another optional embodiment, file acquisition module 42 is in target HTML text and target CSS
During file, specifically for:
Facility environment information is sent to into server, so that server is obtained according to facility environment acquisition of information target
Take HTML texts;
The target HTML text that the reception server is returned;
The CSS file identifications carried in obtaining target HTML text;
The CSS files that identified of CSS file identifications are obtained as target CSS file from server.
The page charger that the present embodiment is provided, supports to configure matching for distinct device environmental information
HTML texts, in page loading procedure is carried out, need to only load the HTML with facility environment information matches
Text, due to load HTML texts be different from prior art in all devices environmental information share it is necessary
The html file of various facility environments can be applied to, its data volume is relatively small, advantageously reduces in page
The network traffics consumed in the loading procedure of face, lift loading velocity.
The structural representation of the page charger that Fig. 5 is provided for the another embodiment of the application.The device can position
Realize in server, as shown in figure 5, the device includes:Receiver module 51, file acquisition module 52
With sending module 53.
Receiver module 51, the page to be represented for receiving browser transmission need the facility environment information of response
Corresponding HTML texts mark and CSS file identifications.
File acquisition module 52, what the HTML texts for obtaining the reception of receiver module 51 were identified
HTML texts are used as the target HTML text with facility environment information match, and obtain receiver module 51
The CSS files identified by the CSS file identifications of reception are used as the target with facility environment information match
CSS files.
Sending module 53, for returning the target HTML text that file acquisition module 52 is obtained to browser
And target CSS file, so that browser renders go out the page to be represented.
Optionally, receiver module 51 is additionally operable to:
The accessing page request that browser sends is received, and the script of reception browser obtains request, script
Obtain request and carry the mark that response type monitors script.
Accordingly, sending module 53 is additionally operable to:
The HTML header informations of the page to be represented, HTML heads are returned according to accessing page request to browser
Portion's information includes that response type monitors the mark of script;And the mark of script is monitored according to response type, to browsing
Device returns response type monitoring script, monitors script by response type for browser and obtains facility environment information.
Further, above-mentioned HTML header informations also include:The mark of the first response type configuration file, first
Response type configuration file include HTML texts mark, it is right between CSS file identifications and facility environment information
Should be related to.
Based on above-mentioned, receiver module 51 is additionally operable to:
The first file acquisition request that browser sends is received, the request of the first file acquisition includes the first response type
The mark of configuration file.
Accordingly, sending module 53 is additionally operable to:
According to the mark of the first response type configuration file, the first response type configuration file is returned to browser, with
The corresponding html file mark of facility environment information and CSS file identifications are determined for browser.
Further, above-mentioned HTML header informations also include:The mark of the second response type configuration file, second
Response type configuration file includes the corresponding relation between HTML texts mark and facility environment information.
Based on above-mentioned, receiver module 51 is additionally operable to:
The second file acquisition request that browser sends is received, the request of the second file acquisition includes the second response type
The mark of configuration file.
Accordingly, sending module 53 is additionally operable to:
According to the mark of the second response type configuration file, the second response type configuration file is returned to browser, with
The corresponding html file mark of facility environment information and CSS file identifications are determined for browser.
The page charger that the present embodiment is provided, is realized in server, is cooperated with browser,
The HTML texts mark and CSS file identifications provided according to browser is that browser is obtained and its facility environment
The target HTML text and target CSS file of information match so that browser can realize response type page
The loading in face, while reducing the network traffics for consuming, improves loading velocity.In addition, what the present embodiment was provided
Page charger, is adapted to the relative complex page of loading interaction, can be by way of by screen loading
Reduce user's loading in use to perceive.
The structural representation of the page charger that Fig. 6 is provided for the another embodiment of the application.The device can position
Realize in server, as shown in fig. 6, the device includes:Receiver module 61, file acquisition module 62
With sending module 63.
Receiver module 61, the page to be represented for receiving browser transmission need the facility environment information of response.
File acquisition module 62, for obtaining the facility environment information match received with receiver module 61
Target HTML text and target CSS file;
Sending module 63, for the target HTML text that obtains file acquisition module 62 and target CSS
File returns to browser, so that browser renders go out the page to be represented.
In an optional embodiment, file acquisition module 62 specifically for:
Matched in the corresponding relation that the first response type configuration file includes according to facility environment information, with
Obtain HTML texts mark corresponding with facility environment information and CSS file identifications, the configuration of the first response type
File includes HTML texts mark, the corresponding relation between CSS file identifications and facility environment information;
Obtain HTML texts and identified HTML texts are identified as target HTML text, and obtain
The CSS files identified by CSS file identifications are used as target CSS file.
In another optional embodiment, file acquisition module 62 specifically for:
Matched in the corresponding relation that the second response type configuration file includes according to facility environment information, with
HTML texts mark corresponding with facility environment information is obtained, the second response type configuration file includes HTML
Corresponding relation between text mark and facility environment information;
Obtain HTML texts identified HTML texts are identified as target HTML text;
Receive the CSS file identifications obtained from target HTML text that browser sends;
The CSS files identified by acquisition CSS file identifications are used as target CSS file.
The page charger that the present embodiment is provided, is realized in server, is cooperated with browser,
It is that browser obtains the target with its facility environment information match according to the facility environment information that browser is provided
HTML texts and target CSS file so that browser can realize the loading of the response type page, while subtracting
Few network traffics for consuming, improve loading velocity.In addition, the page charger that the present embodiment is provided, fits
It is less complicated that conjunction loads those interactions, it is not necessary to the page that frequently monitoring users operation is affected on page layout
Face.
Those skilled in the art can be understood that, for convenience and simplicity of description, foregoing description
System, apparatus, and unit specific work process, may be referred to the corresponding process in preceding method embodiment,
Will not be described here.
In several embodiments provided herein, it should be understood that disclosed system, device and side
Method, can be realized by another way.For example, device embodiment described above is only schematic
, for example, the division of the unit, only a kind of division of logic function can have another when actually realizing
Outer dividing mode, such as multiple units or component can with reference to or be desirably integrated into another system, or
Some features can be ignored, or not perform.It is another, shown or discussed coupling each other or straight
It can be INDIRECT COUPLING or communication connection by some interfaces, device or unit to connect coupling or communication connection,
Can be electrical, mechanical or other forms.
It is described as separating component explanation unit can be or may not be it is physically separate, as
The part that unit shows can be or may not be physical location, you can local to be located at one, or
Can also be distributed on multiple NEs.Can select according to the actual needs therein some or all of
Unit is realizing the purpose of this embodiment scheme.
In addition, each functional unit in the application each embodiment can be integrated in a processing unit,
Can also be that unit is individually physically present, it is also possible to which two or more units are integrated in a unit
In.Above-mentioned integrated unit both can be realized in the form of hardware, it would however also be possible to employ hardware adds software function
The form of unit is realized.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in a computer can
Read in storage medium.Above-mentioned SFU software functional unit is stored in a storage medium, is used including some instructions
So that a computer equipment (can be personal computer, server, or network equipment etc.) or place
Reason device (processor) performs the part steps of each embodiment methods described of the application.And aforesaid storage
Medium includes:USB flash disk, portable hard drive, read only memory (Read-Only Memory, ROM), with
Machine access memorizer (Random Access Memory, RAM), magnetic disc or CD etc. are various can be with
The medium of store program codes.
Finally it should be noted that:Above example is only illustrating the technical scheme of the application, rather than which is limited
System;Although being described in detail to the application with reference to the foregoing embodiments, one of ordinary skill in the art
It should be understood that:Which still can be modified to the technical scheme described in foregoing embodiments, or to which
Middle some technical characteristics carry out equivalent;And these modifications or replacement, do not make appropriate technical solution
Essence departs from the spirit and scope of each embodiment technical scheme of the application.
Claims (28)
1. a kind of page loading method, it is characterised in that include:
Obtaining the page to be represented needs the facility environment information of response;
Obtain the target HTML text and target CSS file with the facility environment information match;
Page rendering process is carried out according to the target CSS file and the target HTML text, to obtain
The page to be represented.
2. method according to claim 1, it is characterised in that described to obtain the page to be represented and need to ring
The facility environment information answered, including:
Operation response type monitoring script, with the window object of access browser;
From the window object, the facility environment information is read.
3. method according to claim 2, it is characterised in that the operation response type monitors script,
Before with the window object of access browser, including:
Accessing page request is sent to server, to ask the HTML header informations of the page to be represented;
The HTML header informations that the server is returned are received, the HTML header informations include institute
State the mark that response type monitors script;
Script is sent to the server and obtains request, the script obtains request and carries the response type prison
Survey the mark of script;
Receive the response type monitoring foot that the server is returned according to the mark that the response type monitors script
This.
4. method according to claim 3, it is characterised in that the HTML header informations also include:
The mark of the first response type configuration file, the first response type configuration file include HTML texts mark,
Corresponding relation between CSS file identifications and facility environment information;
Methods described also includes:
The request of the first file acquisition is sent to the server, first file acquisition request includes described the
The mark of one response type configuration file, with the first response type configuration file described in acquisition request;
Receive the first response type configuration file that the server is returned;
The target HTML text and target CSS file obtained with the facility environment information match,
Including:
Carried out in the corresponding relation that the first response type configuration file includes according to the facility environment information
Matching, to obtain HTML texts mark corresponding with the facility environment information and CSS file identifications;
The HTML texts are obtained from the server identified HTML texts are identified as the target
Html file, and the CSS files work identified by the CSS file identifications is obtained from the server
For the target CSS file.
5. method according to claim 3, it is characterised in that the HTML header informations also include:
The mark of the second response type configuration file, the second response type configuration file include HTML texts mark and
Corresponding relation between facility environment information;
Methods described also includes:
The request of the second file acquisition is sent to the server, second file acquisition request includes described the
The mark of two response type configuration files, with the second response type configuration file described in acquisition request;
Receive the second response type configuration file that the server is returned;
The target HTML text and target CSS file obtained with the facility environment information match,
Including:
Carried out in the corresponding relation that the second response type configuration file includes according to the facility environment information
Matching, to obtain HTML texts mark corresponding with the facility environment information;
The HTML texts are obtained from the server identified HTML texts are identified as the target
HTML texts;
The CSS file identifications carried in obtaining the target HTML text;
CSS files that the CSS file identifications are identified are obtained as the target from the server
CSS files.
6. method according to claim 1, it is characterised in that the acquisition is believed with the facility environment
The target HTML text and target CSS file of manner of breathing matching, including:
The facility environment information is sent to into server, so that the server is believed according to the facility environment
Breath obtains the target HTML text and the target CSS file;
Receive the target HTML text and the target CSS file that the server is returned.
7. method according to claim 1, it is characterised in that the acquisition is believed with the facility environment
The target HTML text and target CSS file of manner of breathing matching, including:
The facility environment information is sent to into server, so that the server is believed according to the facility environment
Breath obtains the Target Acquisition HTML texts;
Receive the target HTML text that the server is returned;
The CSS file identifications carried in obtaining the target HTML text;
CSS files that the CSS file identifications are identified are obtained as the target from the server
CSS files.
8. a kind of page loading method, it is characterised in that include:
Receive the corresponding HTML texts of facility environment information of the page needs response to be represented that browser sends
Mark and CSS file identifications;
Obtain the HTML texts identify identified HTML texts as with the facility environment information phase
The target HTML text of matching, and obtain CSS files that the CSS file identifications are identified as with
The target CSS file of the facility environment information match;
The target HTML text and the target CSS file are returned to the browser, for described clear
Device of looking at renders the page to be represented.
9. method according to claim 8, it is characterised in that what the reception browser sent waits to open up
Before the existing page needs the corresponding HTML texts mark of the facility environment information of response and CSS file identifications,
Also include:
Receive the accessing page request that the browser sends;
The HTML heads letter of the page to be represented according to the accessing page request is returned to the browser
Breath, the HTML header informations include that response type monitors the mark of script;
The script for receiving the browser obtains request, and the script obtains request and carries the response type prison
Survey the mark of script;
The mark of script is monitored according to the response type, the response type is returned to the browser and is monitored script,
Script is monitored by the response type for the browser and obtains the facility environment information.
10. method according to claim 9, it is characterised in that the HTML header informations are also wrapped
Include:The mark of the first response type configuration file, the first response type configuration file include HTML text marks
Knowledge, the corresponding relation between CSS file identifications and facility environment information;
Methods described also includes:
The first file acquisition request that the browser sends is received, the first file acquisition request includes institute
State the mark of the first response type configuration file;
According to the mark of the first response type configuration file, first response type is returned to the browser
Configuration file, for the browser determine the facility environment information corresponding html file mark and
CSS file identifications.
11. methods according to claim 9, it is characterised in that the HTML header informations are also wrapped
Include:The mark of the second response type configuration file, the second response type configuration file include HTML text marks
Corresponding relation between knowledge and facility environment information;
Methods described also includes:
The second file acquisition request that the browser sends is received, the second file acquisition request includes institute
State the mark of the second response type configuration file;
According to the mark of the second response type configuration file, second response type is returned to the browser
Configuration file, for the browser determine the facility environment information corresponding html file mark and
CSS file identifications.
12. a kind of page loading methods, it is characterised in that include:
Receive the facility environment information of the page needs response to be represented that browser sends;
Obtain the target HTML text and target CSS file with the facility environment information match;
The target HTML text and the target CSS file are returned to into the browser, for described
Browser renders go out the page to be represented.
13. methods according to claim 12, it is characterised in that the acquisition and the facility environment
The target HTML text and target CSS file of information match, including:
Carried out in the corresponding relation that the first response type configuration file includes according to the facility environment information
Match somebody with somebody, it is to obtain HTML texts mark corresponding with the facility environment information and CSS file identifications, described
First response type configuration file include HTML texts mark, between CSS file identifications and facility environment information
Corresponding relation;
Obtain the HTML texts identified HTML texts are identified as the target HTML text,
And CSS files that the CSS file identifications are identified are obtained as the target CSS file.
14. methods according to claim 12, it is characterised in that the acquisition and the facility environment
The target HTML text of information match, including:
Carried out in the corresponding relation that the second response type configuration file includes according to the facility environment information
Match somebody with somebody, to obtain HTML texts mark corresponding with the facility environment information, the second response type configuration
File includes the corresponding relation between HTML texts mark and facility environment information;
Obtain the HTML texts identified HTML texts are identified as the target HTML text;
The target CSS file obtained with the facility environment information match, including:
Receive the CSS file identifications obtained from the target HTML text that the browser sends;
CSS files that the CSS file identifications are identified are obtained as the target CSS file.
A kind of 15. page chargers, realize in browser, it is characterised in that the page loading
Device includes:
Data obtaining module, needs the facility environment information of response for obtaining the page to be represented;
File acquisition module, for obtain with the target HTML text of the facility environment information match and
Target CSS file;
Rendering module, for carrying out page wash with watercolours according to the target CSS file and the target HTML text
Dye process, to obtain the page to be represented.
16. devices according to claim 15, it is characterised in that described information acquisition module is specifically used
In:
Operation response type monitoring script, with the window object of access browser;
From the window object, the facility environment information is read.
17. devices according to claim 16, it is characterised in that described information acquisition module is additionally operable to:
Accessing page request is sent to server, to ask the HTML header informations of the page to be represented;
The HTML header informations that the server is returned are received, the HTML header informations include institute
State the mark that response type monitors script;
Script is sent to the server and obtains request, the script obtains request and carries the response type prison
Survey the mark of script;
Receive the response type monitoring foot that the server is returned according to the mark that the response type monitors script
This.
18. devices according to claim 17, it is characterised in that the HTML header informations are also
Including:The mark of the first response type configuration file, the first response type configuration file include HTML texts
Mark, the corresponding relation between CSS file identifications and facility environment information;
Described information acquisition module is additionally operable to:
The request of the first file acquisition is sent to the server, first file acquisition request includes described the
The mark of one response type configuration file, with the first response type configuration file described in acquisition request;
Receive the first response type configuration file that the server is returned;
The file acquisition module specifically for:
Carried out in the corresponding relation that the first response type configuration file includes according to the facility environment information
Matching, to obtain HTML texts mark corresponding with the facility environment information and CSS file identifications;
The HTML texts are obtained from the server identified HTML texts are identified as the target
Html file, and the CSS files work identified by the CSS file identifications is obtained from the server
For the target CSS file.
19. devices according to claim 16, it is characterised in that the HTML header informations are also
Including:The mark of the second response type configuration file, the second response type configuration file include HTML texts
Corresponding relation between mark and facility environment information;
Described information acquisition module is additionally operable to:
The request of the second file acquisition is sent to the server, second file acquisition request includes described the
The mark of two response type configuration files, with the second response type configuration file described in acquisition request;
Receive the second response type configuration file that the server is returned;
The file acquisition module specifically for:
Carried out in the corresponding relation that the second response type configuration file includes according to the facility environment information
Matching, to obtain HTML texts mark corresponding with the facility environment information;
The HTML texts are obtained from the server identified HTML texts are identified as the target
HTML texts;
The CSS file identifications carried in obtaining the target HTML text;
CSS files that the CSS file identifications are identified are obtained as the target from the server
CSS files.
20. device according to claim 15, it is characterised in that the file acquisition module is specifically used
In:
The facility environment information is sent to into server, so that the server is believed according to the facility environment
Breath obtains the target HTML text and the target CSS file;
Receive the target HTML text and the target CSS file that the server is returned.
21. devices according to claim 15, it is characterised in that the file acquisition module is specifically used
In:
The facility environment information is sent to into server, so that the server is believed according to the facility environment
Breath obtains the Target Acquisition HTML texts;
Receive the target HTML text that the server is returned;
The CSS file identifications carried in obtaining the target HTML text;
CSS files that the CSS file identifications are identified are obtained as the target from the server
CSS files.
A kind of 22. page chargers, realize in server, it is characterised in that the page loading
Device includes:
Receiver module, the page to be represented for receiving browser transmission need the facility environment information pair of response
The HTML texts mark answered and CSS file identifications;
File acquisition module, for obtain the HTML texts identify identified HTML texts as with
The target HTML text of the facility environment information match, and obtain the CSS file identifications and identified
CSS files as the target CSS file with the facility environment information match;
Sending module, for returning the target HTML text and target CSS text to the browser
Part, so that the browser renders go out the page to be represented.
23. devices according to claim 22, it is characterised in that the receiver module is additionally operable to:
The accessing page request that the browser sends is received, and the script of the reception browser is obtained and asked
Ask, the script obtains request and carries the mark that response type monitors script;
The sending module is additionally operable to:
The HTML heads letter of the page to be represented according to the accessing page request is returned to the browser
Breath, the HTML header informations include that the response type monitors the mark of script;And according to the response
Formula monitors the mark of script, returns the response type to the browser and monitors script, for the browser
Script is monitored by the response type and obtains the facility environment information.
24. devices according to claim 23, it is characterised in that the HTML header informations are also
Including:The mark of the first response type configuration file, the first response type configuration file include HTML texts
Mark, the corresponding relation between CSS file identifications and facility environment information;
The receiver module is additionally operable to:
The first file acquisition request that the browser sends is received, the first file acquisition request includes institute
State the mark of the first response type configuration file;
The sending module is additionally operable to:
According to the mark of the first response type configuration file, first response type is returned to the browser
Configuration file, for the browser determine the facility environment information corresponding html file mark and
CSS file identifications.
25. devices according to claim 23, it is characterised in that the HTML header informations are also
Including:The mark of the second response type configuration file, the second response type configuration file include HTML texts
Corresponding relation between mark and facility environment information;
The receiver module is additionally operable to:
The second file acquisition request that the browser sends is received, the second file acquisition request includes institute
State the mark of the second response type configuration file;
The sending module is additionally operable to:
According to the mark of the second response type configuration file, second response type is returned to the browser
Configuration file, for the browser determine the facility environment information corresponding html file mark and
CSS file identifications.
A kind of 26. page chargers, realize in server, it is characterised in that the page loading
Device includes:
Receiver module, the page to be represented for receiving browser transmission need the facility environment information of response;
File acquisition module, for obtain with the target HTML text of the facility environment information match and
Target CSS file;
Sending module, it is described clear for the target HTML text and the target CSS file are returned to
Look at device, so that the browser renders go out the page to be represented.
27. devices according to claim 26, it is characterised in that the file acquisition module is specifically used
In:
Carried out in the corresponding relation that the first response type configuration file includes according to the facility environment information
Match somebody with somebody, it is to obtain HTML texts mark corresponding with the facility environment information and CSS file identifications, described
First response type configuration file include HTML texts mark, between CSS file identifications and facility environment information
Corresponding relation;
Obtain the HTML texts identified HTML texts are identified as the target HTML text,
And CSS files that the CSS file identifications are identified are obtained as the target CSS file.
28. devices according to claim 26, it is characterised in that the file acquisition module is specifically used
In:
Carried out in the corresponding relation that the second response type configuration file includes according to the facility environment information
Match somebody with somebody, to obtain HTML texts mark corresponding with the facility environment information, the second response type configuration
File includes the corresponding relation between HTML texts mark and facility environment information;
Obtain the HTML texts identified HTML texts are identified as the target HTML text;
Receive the CSS file identifications obtained from the target HTML text that the browser sends;
CSS files that the CSS file identifications are identified are obtained as the target CSS file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510621240.8A CN106547806B (en) | 2015-09-23 | 2015-09-23 | Page loading method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510621240.8A CN106547806B (en) | 2015-09-23 | 2015-09-23 | Page loading method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106547806A true CN106547806A (en) | 2017-03-29 |
CN106547806B CN106547806B (en) | 2020-12-18 |
Family
ID=58365337
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510621240.8A Active CN106547806B (en) | 2015-09-23 | 2015-09-23 | Page loading method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106547806B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107729074A (en) * | 2017-09-25 | 2018-02-23 | 百富计算机技术(深圳)有限公司 | A kind of loading method and device of the user interface of POS applications |
CN109857473A (en) * | 2017-11-29 | 2019-06-07 | 北京京东尚科信息技术有限公司 | A kind of loading method and device of page data |
CN109934642A (en) * | 2019-03-29 | 2019-06-25 | 珠海豹好玩科技有限公司 | A kind of advertisement generation method, methods of exhibiting and corresponding system |
CN110609966A (en) * | 2018-05-29 | 2019-12-24 | 阿里巴巴集团控股有限公司 | Page display method, device and equipment |
CN110889074A (en) * | 2019-11-27 | 2020-03-17 | 珠海格力电器股份有限公司 | Page display method and device, storage medium and electronic equipment |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999063453A1 (en) * | 1998-06-05 | 1999-12-09 | Creative Internet Concepts Llc | System for inserting background advertising into web page presentation or e-mail messages |
US20060253454A1 (en) * | 2005-05-05 | 2006-11-09 | International Business Machines Corporation | System, method and program product for determining if a user has received a redirected web page |
CN102254550A (en) * | 2010-05-21 | 2011-11-23 | 腾讯科技(深圳)有限公司 | Method and system for reading characters on webpage |
US20120302337A1 (en) * | 2011-05-24 | 2012-11-29 | Vijay Thakkar | Online game for matching text with images |
CN102915308A (en) * | 2011-08-02 | 2013-02-06 | 阿里巴巴集团控股有限公司 | Method and device for rendering pages |
CN103049536A (en) * | 2012-11-01 | 2013-04-17 | 广州汇讯营销咨询有限公司 | Webpage main text content extracting method and webpage text content extracting system |
CN103064943A (en) * | 2012-12-25 | 2013-04-24 | 北京奇虎科技有限公司 | Customer premises equipment |
US20130227397A1 (en) * | 2012-02-24 | 2013-08-29 | Microsoft Corporation | Forming an instrumented text source document for generating a live web page |
CN103336794A (en) * | 2013-06-09 | 2013-10-02 | 百度在线网络技术(北京)有限公司 | Method and device for providing corresponding presence information on destination page |
CN103634358A (en) * | 2012-08-27 | 2014-03-12 | 深圳中兴网信科技有限公司 | Browser adaption method and apparatus |
US20140108897A1 (en) * | 2012-10-16 | 2014-04-17 | Linkedin Corporation | Method and apparatus for document conversion |
CN104063460A (en) * | 2014-06-25 | 2014-09-24 | 北京奇虎科技有限公司 | Method and device for loading webpage in browser |
CN104123362A (en) * | 2014-07-18 | 2014-10-29 | 华中师范大学 | Multi-terminal-device-oriented webpage adaptation layout method |
US20150082424A1 (en) * | 2013-09-19 | 2015-03-19 | Jayant Shukla | Active Web Content Whitelisting |
CN104572843A (en) * | 2014-12-12 | 2015-04-29 | 百度在线网络技术(北京)有限公司 | Page loading method and device |
-
2015
- 2015-09-23 CN CN201510621240.8A patent/CN106547806B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999063453A1 (en) * | 1998-06-05 | 1999-12-09 | Creative Internet Concepts Llc | System for inserting background advertising into web page presentation or e-mail messages |
US20060253454A1 (en) * | 2005-05-05 | 2006-11-09 | International Business Machines Corporation | System, method and program product for determining if a user has received a redirected web page |
CN102254550A (en) * | 2010-05-21 | 2011-11-23 | 腾讯科技(深圳)有限公司 | Method and system for reading characters on webpage |
US20120302337A1 (en) * | 2011-05-24 | 2012-11-29 | Vijay Thakkar | Online game for matching text with images |
CN102915308A (en) * | 2011-08-02 | 2013-02-06 | 阿里巴巴集团控股有限公司 | Method and device for rendering pages |
US20130227397A1 (en) * | 2012-02-24 | 2013-08-29 | Microsoft Corporation | Forming an instrumented text source document for generating a live web page |
CN103634358A (en) * | 2012-08-27 | 2014-03-12 | 深圳中兴网信科技有限公司 | Browser adaption method and apparatus |
US20140108897A1 (en) * | 2012-10-16 | 2014-04-17 | Linkedin Corporation | Method and apparatus for document conversion |
CN103049536A (en) * | 2012-11-01 | 2013-04-17 | 广州汇讯营销咨询有限公司 | Webpage main text content extracting method and webpage text content extracting system |
CN103064943A (en) * | 2012-12-25 | 2013-04-24 | 北京奇虎科技有限公司 | Customer premises equipment |
CN103336794A (en) * | 2013-06-09 | 2013-10-02 | 百度在线网络技术(北京)有限公司 | Method and device for providing corresponding presence information on destination page |
US20150082424A1 (en) * | 2013-09-19 | 2015-03-19 | Jayant Shukla | Active Web Content Whitelisting |
CN104063460A (en) * | 2014-06-25 | 2014-09-24 | 北京奇虎科技有限公司 | Method and device for loading webpage in browser |
CN104123362A (en) * | 2014-07-18 | 2014-10-29 | 华中师范大学 | Multi-terminal-device-oriented webpage adaptation layout method |
CN104572843A (en) * | 2014-12-12 | 2015-04-29 | 百度在线网络技术(北京)有限公司 | Page loading method and device |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107729074A (en) * | 2017-09-25 | 2018-02-23 | 百富计算机技术(深圳)有限公司 | A kind of loading method and device of the user interface of POS applications |
CN107729074B (en) * | 2017-09-25 | 2021-02-23 | 百富计算机技术(深圳)有限公司 | Method and device for loading user interface of POS application |
CN109857473A (en) * | 2017-11-29 | 2019-06-07 | 北京京东尚科信息技术有限公司 | A kind of loading method and device of page data |
CN110609966A (en) * | 2018-05-29 | 2019-12-24 | 阿里巴巴集团控股有限公司 | Page display method, device and equipment |
CN110609966B (en) * | 2018-05-29 | 2023-06-06 | 阿里巴巴集团控股有限公司 | Page display method, device and equipment thereof |
CN109934642A (en) * | 2019-03-29 | 2019-06-25 | 珠海豹好玩科技有限公司 | A kind of advertisement generation method, methods of exhibiting and corresponding system |
CN110889074A (en) * | 2019-11-27 | 2020-03-17 | 珠海格力电器股份有限公司 | Page display method and device, storage medium and electronic equipment |
CN110889074B (en) * | 2019-11-27 | 2022-04-08 | 珠海格力电器股份有限公司 | Page display method and device, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN106547806B (en) | 2020-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104112002B (en) | A kind of methods, devices and systems of list adaptation | |
CN106547806A (en) | Page loading method and device | |
CN108228305A (en) | Display methods, device, storage medium and the electronic equipment of five application page | |
CN106250464B (en) | Training method and device of ranking model | |
CN103605502B (en) | Form page display method and server | |
CN104965691A (en) | Method, apparatus and system for configuring page elements of a webpage | |
CN105338026A (en) | Data resource acquisition method, device and system | |
CN107423085A (en) | Method and apparatus for application deployment | |
CN107291759A (en) | The treating method and apparatus of browser page resource | |
CN103559194B (en) | A kind of searching method, server, system | |
CN108023867A (en) | Method, gateway server and the filtering server of mobile terminal web advertisement filtering | |
CN106817391A (en) | Document breakpoint transmission method and apparatus | |
CN102122281A (en) | Method, device and system for generating page form | |
CN107894945A (en) | Bury an adding method, mobile terminal and computer-readable recording medium | |
CN102591916A (en) | Webpage opening method and website system | |
CN106528587A (en) | Page display method and apparatus in composite webpage system | |
CN106886594A (en) | For the method and apparatus of exhibition information | |
CN100504877C (en) | Method and device for collecting web page action | |
CN105550179A (en) | Webpage collection method and browser plug-in | |
CN106383752A (en) | Browser page abnormity recovery processing method and device | |
CN103617043B (en) | A kind of method and system uploaded with picture web data | |
CN107632971A (en) | Method and apparatus for generating multidimensional form | |
CN103123651A (en) | Method of rapidly searching multiple same-kind paper, device and mobile equipment | |
CN107729573A (en) | Information-pushing method and device | |
CN104572981B (en) | A kind of Webpage method for caching and processing and mobile terminal device |
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 |