CN105512160B - Webpage code-transferring method, webpage transcoding device and Web browsing system - Google Patents

Webpage code-transferring method, webpage transcoding device and Web browsing system Download PDF

Info

Publication number
CN105512160B
CN105512160B CN201410855598.2A CN201410855598A CN105512160B CN 105512160 B CN105512160 B CN 105512160B CN 201410855598 A CN201410855598 A CN 201410855598A CN 105512160 B CN105512160 B CN 105512160B
Authority
CN
China
Prior art keywords
webpage
list
type
attributes
form attributes
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.)
Expired - Fee Related
Application number
CN201410855598.2A
Other languages
Chinese (zh)
Other versions
CN105512160A (en
Inventor
刘承诚
孙昌青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Guangzhou Shenma Mobile Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shenma Mobile Information Technology Co Ltd filed Critical Guangzhou Shenma Mobile Information Technology Co Ltd
Priority to CN201410855598.2A priority Critical patent/CN105512160B/en
Publication of CN105512160A publication Critical patent/CN105512160A/en
Application granted granted Critical
Publication of CN105512160B publication Critical patent/CN105512160B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses webpage code-transferring method, webpage transcoding device and Web browsing system.Wherein described webpage code-transferring method is after by the webpage transcoding of the first kind for the webpage of Second Type, by changing the form attributes of the webpage of Second Type and sending to browser the webpage of Second Type, so that browser according to the amended form attributes when list submission request is sent, the form attributes of the form data of user input and the webpage of the first kind are sent to the webpage transcoding device, webpage transcoding device is set to realize that the form data submitted to user carries out forwarding submission according to the accessible attribute of Website server, so as to ensure that user is normally run by the function that list and Website server are interacted, improve the viewing experience of user.

Description

Webpage code-transferring method, webpage transcoding device and Web browsing system
Technical field
The present invention relates to Internet technical field, more particularly to webpage code-transferring method, webpage transcoding device and webpage is clear Look at system.
Background technology
With the fast development of the intelligent and mobile Internet of mobile terminal, user is provided by web page acquisition by mobile terminal The demand in source is on the increase.But the webpage major part that major search engines are provided the user at present is still to be in based on PC browsers WEB editions existing webpage, is adapted to WAP editions (WAP Wireless Application of browser of mobile terminal Protocol) webpage is less.The factor influences such as screen size, mobile flow due to mobile terminal, cause clear in mobile terminal Look in device directly browse traditional WEB editions webpage Consumer's Experience it is poor.In consideration of it, each search engine provides the user webpage transcoding Service, for WEB editions webpage in browser of mobile terminal Search Results to be converted into corresponding WAP editions webpage, conventional turns Change processing mode and be usually typesetting again, or remove some comparing consumption data flows and take the media of excessive source of screen Element etc., so that the browser for adapting to mobile terminal shows.
Inventor realize it is of the invention during find, existing webpage transcoding technology mostly simply to former WEB editions net Page carries out some and simplifies treatment to obtain corresponding WAP editions webpage, and specific for list webpage this class comprising list For webpage, carried to the corresponding Website server of former WEB editions webpage in WAP editions webpage not with respect to user after transcoding Hand over after list, the transcoding of the response webpage returned to the Website server is processed.For example, in some cases, user is turning In WAP editions webpage after code after submission form, the response webpage of return directly jumps into former WEB not by transcoding In version webpage, even or have passed through transcoding, but due to the corresponding Website server of former WEB webpages and browser of mobile terminal The coded system of support may be different, cause mess code occur in the response webpage for returning.These can all cause the clear of mobile terminal The device user that lookes at even loses by the way that function that the corresponding website of WEB editions webpage of submission form and original carries out information exchange is impaired, shadow Ring the viewing experience of user.
The content of the invention
Webpage code-transferring method, webpage transcoding device and Web browsing system are provided in the embodiment of the present invention, it is existing to solve Having the webpage transcoding mode in technology causes the browser client of mobile terminal corresponding by WEB editions webpage of submission form and original Website carries out the impaired problem even lost, influence user's viewing experience of function of information exchange.
In order to solve the above-mentioned technical problem, the embodiment of the invention discloses following technical scheme:
On the one hand, there is provided a kind of webpage code-transferring method, methods described includes:
By the webpage transcoding of the first kind for the webpage of Second Type after, change the list category of the webpage of the Second Type Property, the list submission address properties sensing webpage transcoding device that will be included in the form attributes of the webpage of the Second Type, And the form attributes of the webpage of the first kind are included in the form attributes of the webpage of the Second Type;
The webpage of Second Type that will be changed after form attributes is sent to browser, and receives the browser according to repairing The form attributes of the webpage of the Second Type after changing send list when submitting request to, the form data of the user input of transmission and institute State the form attributes of the webpage of the first kind;
The form attributes of the webpage of form data and the first kind according to the list for receiving submits acquisition request to;
The form data is committed to Website server by the form attributes of the webpage according to the first kind;
The response webpage transcoding of the first kind that the Website server is formed according to the form data is Equations of The Second Kind Sent after the response webpage of type to the browser.
Optionally, the form data is committed to website clothes by the form attributes of the webpage according to the first kind Business device includes:
The form data coded system attribute included in the form attributes of the webpage according to the first kind and support The character set attribute of a configuration is encoded to the form data;
The list way of submission attribute and list that the form attributes of the webpage according to the first kind are included submit address to Form data after coding is committed to the Website server by attribute.
Optionally, methods described also includes, if not including what is supported in the form attributes of the webpage of the first kind The character set attribute of a configuration, then obtain the character set type that the document of the webpage of the first kind is used, by the first kind The character set type that the document of webpage is used as the support the character set attribute of a configuration.
Optionally, the step of form attributes of the webpage of the modification Second Type also include:If described second The list way of submission attribute included in the form attributes of the webpage of type is get, then repair the list way of submission attribute It is changed to post;
If the list way of submission attribute is post, or the list way of submission attribute is revised as by get Post, then it is described according to receive the list submit to acquisition request described in form data and the first kind webpage list category Property includes:
Request is submitted to receive the form data that browser sends according to the list;
The list of the webpage of Second Type submits address properties to according to the list submits acquisition request to;
The list of the webpage of the first kind is obtained from the list submission address properties of the webpage of the Second Type Attribute.
Optionally, the step of form attributes of the webpage of the modification Second Type also include:
If the character set attribute of a configuration of the support included in the form attributes of the webpage of the Second Type is not UTF- 8, then the character set attribute of a configuration of the support is revised as UTF-8.
Optionally, if the way of submission attribute included in the form attributes of the webpage of the Second Type is get, institute The form attributes for stating the webpage of form data and the first kind according to the list for receiving submits acquisition request to include:
Parse the list and submit request to, the list for obtaining the webpage of the Second Type submits address properties to;
The list of the webpage according to the Second Type submits to address properties to obtain corresponding uniform resource position mark URL;
The form attributes of the webpage of the form data and the first kind are obtained from the URL.
On the other hand, there is provided a kind of webpage transcoding device, described device includes:
Modification unit, after by the webpage transcoding of the first kind for the webpage of Second Type, changes the Second Type Webpage form attributes, the list that will be included in the form attributes of the webpage of the Second Type submits to address properties to point to The webpage transcoding device, and the form attributes of the webpage of the first kind are included in the table of the webpage of the Second Type In single attribute;
Transmit-Receive Unit, the webpage for will change the Second Type after form attributes is sent to browser, and receives institute When stating browser according to the transmission list submission request of the form attributes of the webpage of amended Second Type, the user input of transmission Form data and the first kind webpage form attributes;
Acquiring unit, for the list that is received according to the Transmit-Receive Unit submit to form data described in acquisition request and The form attributes of the webpage of the first kind;
List submits unit to, for the webpage of the first kind obtained according to the acquiring unit form attributes general described in Form data is committed to Website server;
The Transmit-Receive Unit, is additionally operable to the form data for submitting to unit to submit to according to the list Website server The response webpage transcoding of the first kind of formation for Equations of The Second Kind response webpage after send to the browser.
Optionally, the list submission unit includes:
Coded sub-units, for what is included in the form attributes of the webpage of the first kind obtained according to the acquiring unit Form data coded system attribute and the character set attribute of a configuration supported are encoded to the form data;
Subelement is submitted to, for the table that the form attributes of the webpage of the first kind obtained according to the acquiring unit are included Single way of submission attribute and list submit to address properties that the form data after coding is committed into the Website server.
Optionally, if the modification unit is additionally operable to the list submission side included in the form attributes of the Second Type Formula attribute is get, is post by the list way of submission attribute modification;
The acquiring unit includes:
First receiving subelement, for submitting to request to receive the form data that browser sends according to the list;
First obtains subelement, and the list for the webpage of Second Type according to list submission acquisition request is carried Hand over address properties;
Second obtains subelement, for the webpage from the Second Type list submit address properties in obtain described the The form attributes of the webpage of one type.
Another further aspect, there is provided a kind of Web browsing system, the Web browsing system includes:Client browser, net Page transcoding server and Website server;
Wherein, the webpage transcoding server be used for by the webpage transcoding of the first kind for Second Type webpage after, repair Change the form attributes of the webpage of the Second Type, the list included in the form attributes of the webpage of the Second Type is carried Hand over address properties to point to the webpage transcoding server, and the form attributes of the webpage of the first kind are included in described the In the form attributes of the webpage of two types;
The webpage that the webpage transcoding server is additionally operable to change the Second Type after form attributes is sent to browser, And when receiving the form attributes transmission list submission request of webpage of the browser according to amended Second Type, send User input form data and the first kind webpage form attributes;
The webpage transcoding server be additionally operable to according to receive the list submit to acquisition request described in form data and The form attributes of the webpage of the first kind, and submitted to the form data according to the form attributes of the webpage of the first kind The response webpage of the extremely Website server, and the first kind that the Website server is formed according to the form data Transcoding for Equations of The Second Kind response webpage after send to the client browser.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, for those of ordinary skill in the art Speech, without having to pay creative labor, can also obtain other accompanying drawings according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of webpage code-transferring method provided in an embodiment of the present invention;
The schematic flow sheet of the webpage code-transferring method that Fig. 2 is provided for another embodiment of the present invention;
The schematic flow sheet of the webpage code-transferring method that Fig. 3 is provided for another embodiment of the present invention;
The schematic flow sheet of the webpage code-transferring method that Fig. 4 is provided for another embodiment of the present invention;
The structural representation of the webpage transcoding device that Fig. 5 is provided for one embodiment of the invention;
The structural representation of the webpage transcoding device that Fig. 6 is provided for another embodiment of the present invention;
The structural representation of the webpage transcoding device that Fig. 7 is provided for another embodiment of the present invention;
The structural representation of the Web browsing system that Fig. 8 is provided for one embodiment of the invention.
Specific embodiment
Embodiment first to webpage code-transferring method of the present invention is illustrated, and is that one embodiment of the invention is carried referring to Fig. 1 The schematic flow sheet of the webpage code-transferring method of confession.
Firstly the need of special instruction, technical scheme is not suitable for JavaScript type lists, therefore, Non- JavaScrip types list in webpage can be identified, for the JavaScrip type lists included in webpage, Then processed using other method, the present invention is not related to.
The application provides the recognition methods to non-JavaScrip types list simultaneously, when list meets following rule simultaneously When, the list is non-JavaScrip types list:
List of the list not comprising onsubmit types submits checking to, and
The corresponding list of the list submits to the form of address URL not support JavaScrip, and
Submission label of the list not comprising preset kind, the submission label of the preset kind is botton, Submit and image;
The input control input of the list does not include onclick events, and
The select labels of the list do not include onchange events, and
The father node of the option labels of the list does not include select labels.
Referring to Fig. 1, the embodiment comprises the following steps:
Step 101:Webpage transcoding device by the webpage transcoding of the first kind for the webpage of Second Type after, change described the The form attributes of the webpage of two types, the list that will be included in the form attributes of the webpage of the Second Type submits address category to Property point to webpage transcoding device, and the form attributes of the webpage of the first kind are included in the list of the webpage of the Second Type In attribute.
The webpage of the first kind is WEB editions webpage (webpage for being shown suitable for computer), the webpage of Second Type is WAP Version webpage (webpage for being shown suitable for mobile terminals such as mobile);In this step, " transcoding " refers to two kinds of The conversion of the display format of webpage.It is WAP editions webpage by WEB editions webpage transcoding, refers to, by WEB editions webpage typesetting again, going Fall some comparing consumption data flows and take the media elements of excessive source of screen, it is converted to suitable mobile terminal and show WAP editions webpage webpage transcoding technology.
Specifically, in html language<form>In tag attributes, list submits to address properties to be represented with " action ", should Attribute is defined and whither sends form data when list is submitted to, and its value can be the corresponding URL of destination address or other lattice The address of formula.Before modification, the value of the action attributes points to the corresponding Website server of webpage of the first kind originally, this In the value of the action attributes is revised as the address of webpage transcoding device.
Webpage transcoding device records the form attributes of the webpage of the first kind when the webpage of the first kind is loaded, and The form attributes of the webpage of the first kind are included in the form attributes of the webpage of Second Type, specifically can be by described The form attributes of the webpage of one type are placed on the address in the form attributes of the webpage of the Second Type as subsidiary parameter In attribute, more specifically, the form attributes of the webpage of the first kind as subsidiary parameter can be placed on into described second In the corresponding URL of web page address attribute of type.
It should be noted that be in the present embodiment first by the webpage transcoding of the first kind for Second Type webpage after, then Change the form attributes of the webpage of the Second Type.In other embodiments of the invention, the first kind can first be changed The form attributes of webpage, then by the webpage that the webpage transcoding of the first kind after the modification attribute is corresponding Second Type, The effect that the method for the step of this method is with the present embodiment 101 is reached is identical.
Step 102:The webpage that the Second Type after form attributes will be changed is sent to browser, and is browsed described in reception When device sends list submission request according to the form attributes of the webpage of amended Second Type, the list of the user input of transmission The form attributes of the webpage of data and the first kind.
After browser client is input into form data in the webpage of the Second Type, browser is according to amended second The form attributes of the webpage of type carry out list submission.Referring to step 101, due to the form attributes of the webpage of the first kind It is included in the form attributes of Second Type webpage, therefore browser is by the form data of user input and is included in Second Type Webpage form attributes in the form attributes of webpage of the first kind send in the lump to webpage transcoding device.
Step 103:The webpage of form data and the first kind according to the list for receiving submits acquisition request to Form attributes.
Step 104:The form data is committed to website service by the form attributes of the webpage according to the first kind Device.
Because the accessible form attributes of Website server are identical with the form attributes of the webpage of the first kind, therefore basis The form data is committed to Website server by the form attributes of the webpage of the first kind.
Step 105:The response webpage transcoding of the first kind that the Website server is formed according to the form data To be sent to the browser after the response webpage of Equations of The Second Kind.
User input form data is to carry out information interchange or information inquiry, therefore website service with Website server Device can form corresponding feedback webpage according to the form data, that is, respond webpage.The response webpage remains as the sound of the first kind Answer webpage (the response webpage for being shown suitable for computer), it is therefore desirable to by transcoding device by its transcoding be corresponding Second Type Response webpage (the response webpage for being shown suitable for mobile terminals such as mobile) after be issued to browser again.
" transcoding " in this step is identical with " transcoding " meaning in step 101.
The webpage code-transferring method that the present embodiment is provided leads to after by the webpage transcoding of the first kind for the webpage of Second Type Cross the form attributes of the webpage of modification Second Type and send to browser the webpage of Second Type so that browser is in basis When the amended form attributes send list submission request, by the webpage of the form data of user input and the first kind Form attributes are sent to the webpage transcoding device, so that webpage transcoding device realizes the form data submitted to user according to net The accessible attribute of site server carries out forwarding submission, so as to ensure that what user was interacted by list and Website server Function is normally run, and improves the viewing experience of user.
It is the schematic flow sheet of the webpage code-transferring method that another embodiment of the present invention is provided, methods described bag referring to Fig. 2 Include following steps:
Step 201:Webpage transcoding device by the webpage transcoding of the first kind for Second Type webpage after, by described second The list included in the form attributes of the webpage of type submits to address properties to point to webpage transcoding device.
Step 202:The form attributes of the webpage of the first kind are included in the Second Type by webpage transcoding device Webpage form attributes in.
Optionally, in other embodiments of the invention, it is also possible to judge the list of the webpage of the Second Type after transcoding " the character set attribute of a configuration of support " in attribute, when the value of the attribute is not UTF-8 (unicode, 8-bit Unicode Transformation Format), then the character set attribute of a configuration of the support is revised as UTF-8.UTF-8 is in interconnection A kind of most wide unicode coded systems are used on the net, can be recognized and be processed by most browser.
Step 203:The webpage that webpage transcoding device will change the Second Type after form attributes is sent to browser.
Step 204:Webpage transcoding device receives browser and is sent out according to the form attributes of the webpage of amended Second Type When sending list to submit request to, the form attributes of the webpage of the form data of the user input of transmission and the first kind.
Step 205:Webpage transcoding device form data and first kind according to the list submits acquisition request to The form attributes of webpage.
Step 206:The form data that webpage transcoding device is included in the form attributes according to the webpage of the first kind Coded system attribute and the character set attribute of a configuration supported are encoded to the form data.
Specifically, in html language<form>In tag attributes, the form data coded system attribute is used " enctype " is represented, this attribute specify before submission form data, how it encoded.The character of the support The collection attribute of a configuration is represented with " accept-charset ", this attribute specify the character of the accessible form data of Website server Collection form.
Optionally, if the value that " the character set attribute of a configuration of support " is " accept-charset " has been modified to UTF-8, then in this step, need to only be encoded the form data according to " enctype " attribute, can be saved The step of character set attribute of a configuration according to supporting is encoded, simplifies implementation.
Optionally, if not including the character set attribute of a configuration supported in the form attributes of the webpage of the first kind, The character set type that the document of the webpage of the first kind is used can be then obtained, the document of the first kind webpage is used Character set type as the support the character set attribute of a configuration, you can ensure when the character set lattice of the support cannot be obtained During formula attribute, remain able to for the form data to be encoded into the accessible character set form of the web page server.
Step 207:The list submission side that webpage transcoding device is included according to the form attributes of the webpage of the first kind Formula attribute and list submit to address properties that the form data after coding is committed into the Website server.
Specifically, in html language<form>In the tag attributes of list, list way of submission attribute uses " method " Represent, this attribute specify the HTTP method for sending form data, its value is post or get.
If the value of method is post, in submission form, form data and form attributes parameter are sent respectively To the address that destination address, i.e. action attributes are pointed to;If the value of method is get, in submission form, by list number According to being directly attached to after the URL of action attributes of list, as the URL sends the address pointed to action attributes together.
Because the list of the webpage of the first kind submits to address properties action to point to Website server, therefore need to be by list Data and form attributes parameter are respectively sent to the Website server.
Step 208:The first kind that webpage transcoding device forms the Website server according to the form data Webpage transcoding is responded to be sent to the browser after the response webpage of Second Type.
It is not explained in detail for some steps in the present embodiment, related part can be found in other implementations of the application The description of example.
The webpage code-transferring method that the present embodiment is provided leads to after by the webpage transcoding of the first kind for the webpage of Second Type Cross the form attributes of the webpage of modification Second Type and send to browser the webpage of Second Type so that browser is in basis When the amended form attributes send list submission request, by the webpage of the form data of user input and the first kind Form attributes are sent to the webpage transcoding device, so that webpage transcoding device realizes the form data submitted to user according to net The acceptable attribute of site server carries out forwarding submission, can avoid browser with the accessible coded system of web page server not Unanimously, and the list way of submission and list of both sides receives that mode is inconsistent and the mess code that causes and cannot be to response webpage The problem of transcoding is carried out, so as to ensure that user is normally carried out with the interactive function of Website server, browsing for user is improve Experience.
It is the schematic flow sheet of the webpage code-transferring method that another embodiment of the present invention is provided, methods described bag referring to Fig. 3 Include following steps:
Step 301:Webpage transcoding device by the webpage transcoding of the first kind for Second Type webpage after, by described second The list included in the form attributes of the webpage of type submits to address properties to point to webpage transcoding device.
Step 302:If the list included in the form attributes of the webpage of the webpage transcoding device Second Type is submitted to Mode attribute is get, then be post by the list way of submission attribute modification.
Associated description in the step of embodiment corresponding with reference to Fig. 2 207, will the value of method post is changed to by get.
Step 303:The form attributes of the webpage of the first kind are included in the Second Type by webpage transcoding device Webpage form attributes in.
Step 304:The webpage that webpage transcoding device will change the Second Type after form attributes is sent to browser.
Step 305:Webpage transcoding device receives the list category of webpage of the browser according to amended Second Type Property send list submit to request when, the form attributes of the webpage of the form data of the user input of transmission and the first kind.
Step 306:Webpage transcoding device submits to request to receive the form data that browser sends according to the list.
Step 307:The list of webpage transcoding device webpage of Second Type according to the list submits acquisition request to Submit address properties to.
Step 308:Webpage transcoding device obtains described from the list submission address properties of the webpage of the Second Type The form attributes of the webpage of the first kind.
Because the value of list way of submission attribute has been modified to post, or the value of the attribute is just originally post, with reference to Fig. 2 The associated description of the step 207 in corresponding embodiment, then browser, can be by form data and form attributes in submission form Parameter is respectively sent to webpage transcoding device, therefore when webpage transcoding device receives list and submits request to, receives respectively clear Form data and form attributes that device of looking at sends, and the list category of the webpage of the first kind is obtained from the form attributes Property.
It is post by changing list way of submission attribute in abovementioned steps 302, list can be realized in submission form Data and form attributes are separated so that webpage transcoding device included in form data and form attributes are obtained first It is more convenient during the form attributes of the webpage of type.
Certainly, in other embodiments of the invention, if the value of the form attributes of the Second Type webpage is get, Post can not also be revised as, then webpage transcoding device form data and first according to list submits acquisition request to During the form attributes of the webpage of type, specifically adopt with the following method:
Parse the list and submit request to, the list for obtaining the webpage of the Second Type submits address properties to;
The list of the webpage according to the Second Type submits to address properties to obtain corresponding uniform resource position mark URL;
The form attributes of the webpage of the form data and the first kind are obtained from the URL.
Step 309:The form data is committed to website service by the form attributes of the webpage according to the first kind Device.
Step 310:The response webpage transcoding of the first kind that the Website server is formed according to the form data To be sent to the browser after the response webpage of Second Type.
The webpage code-transferring method that the present embodiment is provided leads to after by the webpage transcoding of the first kind for the webpage of Second Type Cross the form attributes of the webpage of modification Second Type and send to browser the webpage of Second Type so that browser is in basis When the amended form attributes send list submission request, by the webpage of the form data of user input and the first kind Form attributes are sent to the webpage transcoding device, so that webpage transcoding device realizes the form data submitted to user according to net The acceptable attribute of site server carries out forwarding submission, can avoid browser with the accessible coded system of web page server not Unanimously, and the list way of submission and list of both sides receives that mode is inconsistent and the mess code that causes and cannot be to response webpage The problem of transcoding is carried out, so as to ensure that user is normally carried out with the interactive function of Website server, browsing for user is improve Experience.
It is the schematic flow sheet of the webpage code-transferring method that another embodiment of the present invention is provided referring to Fig. 4, the embodiment is detailed The thin interaction flow described between transcoding device and client browser and Website server, with WEB editions in the embodiment Webpage as the first kind webpage, using WAP editions webpage as the webpage of Second Type, the embodiment comprises the following steps:
Step 401:Browser sends to webpage transcoding device and is asked to the WEB editions related transcoding of webpage.
Specifically, user in browser of mobile terminal by clicking on the WEB editions link of webpage, can from trend webpage turn Code device sends transcoding request, by the WEB editions webpage transcoding is corresponding WAP editions net with requested webpage transcoding device Page.
Step 402:Webpage transcoding device asks to send load request to Website server according to the transcoding.
Step 403:Website server generates the WEB editions webpage, and sends described WEB editions to the webpage transcoding device Webpage.
Step 404:Webpage transcoding device loads the WEB editions webpage.
Step 405:Webpage transcoding device records the form attributes of the WEB editions webpage.
Step 406:The WEB editions webpage transcoding is corresponding WAP editions webpage by webpage transcoding device.
Step 407:Webpage transcoding device changes the form attributes of the WAP editions webpage.
The modification includes, the value of the address properties in the form attributes of the WAP editions webpage is revised as into the webpage The address of transcoding device, and the form attributes of the WEP editions webpage for recording are included in the form attributes of the WAP editions webpage In.
Preferably, the list that the form attributes of the WEP editions webpage are included in the WAP editions webpage can be submitted to address In the corresponding URL of attribute.More specifically, the form attributes of the WEP editions webpage can be included in the table of the WAP editions webpage List is submitted in the corresponding incidental parameters of URL of address properties.
Preferably, the way of submission attribute method in the form attributes of the WAP editions webpage is judged, if the property value It is get, then the property value is changed to post.
Preferably, the character set attribute of a configuration accept- of the support in the form attributes of the WAP editions webpage is judged Charset, if the value of the accept-charset is not UTF-8, is revised as UTF-8.
Step 408:Webpage transcoding device sends to browser WAP editions webpage after the modification attribute.
Step 409:Browser obtains the form data of user input.
Step 410:Browser sends list and carries according to the form attributes of the WAP editions webpage to the webpage transcoding device Hand over request.
Step 411:Webpage transcoding device submits to request to obtain the form data according to the list.
Step 412:Webpage transcoding device submits to request to obtain the form attributes of the WEB editions webpage according to the list.
If the method property values were revised as post by get in step 407, or the value of the method attributes would be former Originally it is post, then webpage transcoding device submits to request to receive form data and table that browser sends respectively according to the list Single attribute, is parsing the WEB editions form attributes of webpage wherein including from the form attributes.
Step 413:Webpage transcoding device is compiled the form data according to the form attributes of the WEB editions webpage Code.
Specific coding method can be found in the associated description of the other embodiment in the application.
Step 414:Webpage transcoding device submits the form data after coding to according to the form attributes of the WEB editions webpage To Website server.
Step 415:Website server according to coding after the form data generate corresponding WEB editions response webpage.
Step 416:Website server sends to webpage transcoding device described WEB editions response webpage.
Step 417:Described WEB editions response webpage transcoding is corresponding WAP editions response webpage by webpage transcoding device.
Step 418:Webpage transcoding device sends to browser described WAP editions response webpage.
The webpage code-transferring method that the present embodiment is provided leads to after by the webpage transcoding of the first kind for the webpage of Second Type Cross the form attributes of the webpage of modification Second Type and send to browser the webpage of Second Type so that browser is in basis When the amended form attributes send list submission request, by the webpage of the form data of user input and the first kind Form attributes are sent to the webpage transcoding device, so that webpage transcoding device realizes the form data submitted to user according to net The acceptable attribute of site server carries out forwarding submission, can avoid browser with the accessible coded system of web page server not Unanimously, and the list way of submission and list of both sides receives that mode is inconsistent and the Confused-code that causes, so as to ensure that use Family is normally carried out with the interactive function of Website server, improves the viewing experience of user.
Embodiment with webpage code-transferring method of the present invention is corresponding, present invention also provides the reality of corresponding webpage transcoding device Example is applied, referring to Fig. 5, the webpage transcoding device includes:Modification unit 501, Transmit-Receive Unit 502, acquiring unit 503 and list Submit unit 504 to.
Wherein, it is described modification unit 501 be used for by the webpage transcoding of the first kind for Second Type webpage after, change institute The form attributes of the webpage of Second Type are stated, the list that will be included in the form attributes of the webpage of the Second Type submits ground to Location attribute points to the webpage transcoding device, and the form attributes of the webpage of the first kind are included in into the Second Type Webpage form attributes in.
The Transmit-Receive Unit 502, the webpage for will change the Second Type after form attributes is sent to browser, and When receiving the browser according to the transmission list submission request of the form attributes of the webpage of amended Second Type, the use of transmission The form attributes of the form data of family input and the webpage of the first kind.
The acquiring unit 503, the list for being received according to the Transmit-Receive Unit 502 is submitted to described in acquisition request The form attributes of the webpage of form data and the first kind.
The list submits unit 504 to, the list of the webpage of the first kind for being obtained according to the acquiring unit 503 The form data is committed to Website server by attribute.
The Transmit-Receive Unit 503, is additionally operable to the table for submitting to unit 504 to submit to according to the list Website server Forms data formed the first kind response webpage transcoding be Equations of The Second Kind response webpage after send to the browser.
The structural representation of the webpage transcoding device that Fig. 6 is provided for another embodiment of the present invention, as shown in fig. 6, in institute State in device, the list submission unit 504 includes:
Coded sub-units 5041, the form attributes of the webpage of the first kind for being obtained according to the acquiring unit 503 In the form data coded system attribute that includes and the character set attribute of a configuration supported the form data is encoded.
Submit subelement 5042 to, the form attributes of the webpage of the first kind for being obtained according to the acquiring unit 503 Comprising list way of submission attribute and list submit to address properties the form data after coding is committed to the website service Device.
Optionally, if the list that the modification unit 501 is additionally operable to be included in the form attributes of the Second Type is carried Friendship mode attribute is get, is post by the list way of submission attribute modification, is another embodiment of the present invention referring to Fig. 7 The structural representation of the webpage transcoding device of offer, as shown in fig. 7, the acquiring unit 503 includes:
First receiving subelement 5031, for submitting to request to receive the list number that browser sends according to the list According to;
First obtains subelement 5032, for the table of the webpage of Second Type according to list submission acquisition request It is single to submit address properties to;
Second obtains subelement 5033, for obtaining institute in the list submission address properties of the webpage from the Second Type State the form attributes of the webpage of the first kind.
Optionally, if the way of submission attribute included in the form attributes of the webpage of the Second Type is get, institute Stating acquiring unit 503 can be included (not shown in following subelement figures):
3rd obtains son takes unit, and request is submitted to for parsing the list, obtains the list of the webpage of the Second Type Submit address properties to;
4th obtains subelement, and the list for the webpage according to the Second Type submits to address properties acquisition corresponding Uniform resource position mark URL;
5th obtains subelement, the webpage for obtaining the form data and the first kind from the URL Form attributes.
Optionally, if the acquiring unit 503 is additionally operable to not include in the form attributes of the webpage of the first kind The character set attribute of a configuration of support, obtains the character set type that the document of the webpage of the first kind is used, by described first The character set type that the document of types of web pages is used as the support the character set attribute of a configuration.
Optionally, if the modification unit 501 is additionally operable in the form attributes of the webpage of the Second Type what is included The character set attribute of a configuration of support is not UTF-8, then the character set attribute of a configuration of the support is revised as into UTF-8.
The webpage transcoding device that the present embodiment is provided leads to after by the webpage transcoding of the first kind for the webpage of Second Type Cross the form attributes of the webpage of modification Second Type and send to browser the webpage of Second Type so that browser is in basis When the amended form attributes send list submission request, by the webpage of the form data of user input and the first kind Form attributes are sent to the webpage transcoding device, so that webpage transcoding device realizes the form data submitted to user according to net The acceptable attribute of site server carries out forwarding submission, can avoid browser with the accessible coded system of web page server not Unanimously, and the list way of submission and list of both sides receives that mode is inconsistent and the Confused-code that causes, so as to ensure that use Family is normally carried out with the interactive function of Website server, improves the viewing experience of user.
Embodiment with webpage code-transferring method of the present invention and webpage transcoding device is corresponding, present invention also offers a kind of net Page browsing system, shown in Figure 8, the Web browsing system includes:Client browser 801, webpage transcoding server 802 With Website server 803.
Wherein, the webpage transcoding server 802 be used for by the webpage transcoding of the first kind for Second Type webpage after, Change the form attributes of the webpage of the Second Type, the list that will be included in the form attributes of the webpage of the Second Type Submit to address properties to point to the webpage transcoding server, and the form attributes of the webpage of the first kind are included in described In the form attributes of the webpage of Second Type.
The webpage that the webpage transcoding server 802 is additionally operable to change the Second Type after form attributes is sent to browsing Device, and when receiving the form attributes transmission list submission request of webpage of the browser according to amended Second Type, The form attributes of the webpage of the form data of the user input of transmission and the first kind.
The webpage transcoding server 803 is additionally operable to the form data according to the list for receiving submits acquisition request to With the form attributes of the webpage of the first kind, and the form data is carried according to the form attributes of the webpage of the first kind Hand over to the Website server, and the first kind that the Website server is formed according to the form data response net Page transcoding for Equations of The Second Kind response webpage after send to the client browser.
Optionally, form attributes of the webpage transcoding server 803 specifically for the webpage according to the first kind In the form data coded system attribute that includes and the character set attribute of a configuration supported the form data is encoded, and The list way of submission attribute and list that the form attributes of the webpage according to the first kind are included submit address properties to by volume Form data after code is committed to the Website server.
Optionally, if not including the character set attribute of a configuration supported in the form attributes of the webpage of the first kind, Then the webpage transcoding server 803 is additionally operable to the character set type that the document of the webpage for obtaining the first kind is used, will The character set type that the document of the first kind webpage is used as the support the character set attribute of a configuration.
Optionally, if the character set attribute of a configuration of the support included in the form attributes of the webpage of the Second Type not It is UTF-8, then the webpage transcoding server 803 is additionally operable to for the character set attribute of a configuration of the support to be revised as UTF-8.
Optionally, if the list way of submission attribute included in the form attributes of the webpage of the Second Type is get, It is post that then the webpage transcoding server 803 is additionally operable to the list way of submission attribute modification, if the list is carried Friendship mode attribute is post, or the list way of submission attribute is revised as into post by get, then the webpage transcoding service Device 803 specifically for:
Request is submitted to receive the form data that browser sends according to the list;And
The list of the webpage of Second Type submits address properties to according to the list submits acquisition request to;And
The list of the webpage of the first kind is obtained from the list submission address properties of the webpage of the Second Type Attribute.
Optionally, if the list way of submission attribute included in the form attributes of the webpage of the Second Type is get, Then the webpage transcoding server 803 specifically for:
Parse the list and submit request to, the list for obtaining the webpage of the Second Type submits address properties to;And
The list of the webpage according to the Second Type submits to address properties to obtain corresponding uniform resource position mark URL; And
The form attributes of the webpage of the form data and the first kind are obtained from the URL.
The Web browsing system that the present embodiment is provided leads to after by the webpage transcoding of the first kind for the webpage of Second Type Cross the form attributes of the webpage of modification Second Type and send to browser the webpage of Second Type so that browser is in basis When the amended form attributes send list submission request, by the webpage of the form data of user input and the first kind Form attributes are sent to the webpage transcoding device, so that webpage transcoding device realizes the form data submitted to user according to net The acceptable attribute of site server carries out forwarding submission, can avoid browser with the accessible coded system of web page server not Unanimously, and the list way of submission and list of both sides receives that mode is inconsistent and the Confused-code that causes, so as to ensure that use Family is normally carried out with the interactive function of Website server, improves the viewing experience of user.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.Especially for device and For system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to method The part explanation of embodiment.
It is required that those skilled in the art can be understood that the technology in the embodiment of the present invention can add by software The mode of common hardware realize that common hardware includes universal integrated circuit, universal cpu, general-purpose storage, universal elements Deng, naturally it is also possible to by specialized hardware come real including application specific integrated circuit, dedicated cpu, private memory, special components and parts etc. It is existing, but the former is more preferably implementation method in many cases.Based on such understanding, the technical scheme sheet in the embodiment of the present invention The part contributed to prior art in other words in matter can be embodied in the form of software product, and the computer software is produced Product can be stored in storage medium, such as read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc, CD etc., including some instructions are used to so that computer equipment (can be People's computer, server, or network equipment etc.) perform described in some parts of each embodiment of the invention or embodiment Method.
Invention described above implementation method, is not intended to limit the scope of the present invention..It is any in the present invention Spirit and principle within modification, equivalent and the improvement made etc., should be included within the scope of the present invention.

Claims (10)

1. a kind of webpage code-transferring method, it is characterised in that methods described includes:
By the webpage transcoding of the first kind for the webpage of Second Type after, change the form attributes of the webpage of the Second Type, Address properties are submitted to point to webpage transcoding device with the list that will be included in the form attributes of the webpage of the Second Type, and will The form attributes of the webpage of the first kind are included in the form attributes of the webpage of the Second Type, wherein, described The list of the webpage of the list of the webpage of one type and the Second Type is the list of non-JavaScript types;
After the webpage that the Second Type after form attributes will be changed is sent to browser, and the reception browser is according to modification The form attributes of webpage of Second Type when sending list and submitting request to, the form data of the user input of transmission and described the The form attributes of the webpage of one type;
The form attributes of the webpage of form data and the first kind according to the list for receiving submits acquisition request to;
The form data is committed to Website server by the form attributes of the webpage according to the first kind;
The response webpage transcoding of the first kind that the Website server is formed according to the form data is Second Type Sent to the browser after response webpage.
2. method according to claim 1, it is characterised in that the form attributes of the webpage according to the first kind The form data is committed into Website server includes:
The form data coded system attribute included in the form attributes of the webpage according to the first kind and the character supported The collection attribute of a configuration is encoded to the form data;
The list way of submission attribute and list that the form attributes of the webpage according to the first kind are included submit address properties to Form data after coding is committed to the Website server.
3. method according to claim 2, it is characterised in that
If not comprising the character set attribute of a configuration supported in the form attributes of the webpage of the first kind, obtaining described the The character set type that the document of the webpage of one type is used, the character set type that the document of the first kind webpage is used is made It is the character set attribute of a configuration of the support.
4. the method according to any one of claims 1 to 3, it is characterised in that the webpage of the modification Second Type Form attributes the step of also include:If the list way of submission category included in the form attributes of the webpage of the Second Type Property be get, then by the list way of submission attribute modification be post;
If the list way of submission attribute is post, or the list way of submission attribute is revised as into post by get, Then the list according to reception submits the form attributes bag of the webpage of form data and the first kind described in acquisition request to Include:
Request is submitted to receive the form data that browser sends according to the list;
The list of the webpage of Second Type submits address properties to according to the list submits acquisition request to;
The form attributes of the webpage of the first kind are obtained from the list submission address properties of the webpage of the Second Type.
5. the method according to any one of claims 1 to 3, it is characterised in that the webpage of the modification Second Type Form attributes the step of also include:
If the character set attribute of a configuration of the support included in the form attributes of the webpage of the Second Type is not UTF-8, The character set attribute of a configuration of the support is revised as UTF-8.
6. the method according to any one of claims 1 to 3, it is characterised in that if the table of the webpage of the Second Type The way of submission attribute included in single attribute is get, then the list according to the list for receiving submits acquisition request to The form attributes of the webpage of data and the first kind include:
Parse the list and submit request to, the list for obtaining the webpage of the Second Type submits address properties to;
The list of the webpage according to the Second Type submits to address properties to obtain corresponding uniform resource position mark URL;
The form attributes of the webpage of the form data and the first kind are obtained from the URL.
7. a kind of webpage transcoding device, it is characterised in that described device includes:
Modification unit, after by the webpage transcoding of the first kind for the webpage of Second Type, changes the net of the Second Type The form attributes of page, it is described that the list that will be included in the form attributes of the webpage of the Second Type submits to address properties to point to Webpage transcoding device, and the form attributes of the webpage of the first kind are included in the list category of the webpage of the Second Type In property, wherein, the list of the webpage of the list of the webpage of the first kind and the Second Type is non-JavaScript The list of type;
Transmit-Receive Unit, the webpage for will change the Second Type after form attributes is sent to browser, and is received described clear When device of looking at sends list submission request according to the form attributes of the webpage of amended Second Type, the table of the user input of transmission The form attributes of the webpage of forms data and the first kind;
Acquiring unit, the list for being received according to the Transmit-Receive Unit submits form data and first described in acquisition request to The form attributes of the webpage of type;
List submits unit to, for the form attributes of the webpage of the first kind that are obtained according to the acquiring unit by the list Data are committed to Website server;
The Transmit-Receive Unit, is additionally operable to submit to the form data that unit is submitted to be formed according to the list Website server The first kind response webpage transcoding for Equations of The Second Kind response webpage after send to the browser.
8. webpage transcoding device according to claim 7, it is characterised in that the list submits to the unit to include:
Coded sub-units, for the list included in the form attributes of the webpage of the first kind obtained according to the acquiring unit Data coding mode attribute and the character set attribute of a configuration supported are encoded to the form data;
Subelement, the list included for the form attributes of the webpage of the first kind obtained according to the acquiring unit is submitted to carry Friendship mode attribute and list submit to address properties that the form data after coding is committed into the Website server.
9. the webpage transcoding device according to claim 7 or 8, it is characterised in that if the modification unit is additionally operable to institute The list way of submission attribute included in the form attributes for stating Second Type is get, by the list way of submission attribute modification It is post;
The acquiring unit includes:
First receiving subelement, for submitting to request to receive the form data that browser sends according to the list;
First obtains subelement, and the list for the webpage of Second Type according to list submission acquisition request submits ground to Location attribute;
Second obtains subelement, for obtaining the first kind in the list submission address properties of the webpage from the Second Type The form attributes of the webpage of type.
10. a kind of Web browsing system, it is characterised in that the Web browsing system includes:Client browser, webpage transcoding Server and Website server;
Wherein, the webpage transcoding server be used for by the webpage transcoding of the first kind for Second Type webpage after, change institute The form attributes of the webpage of Second Type are stated, the list that will be included in the form attributes of the webpage of the Second Type submits ground to Location attribute points to the webpage transcoding server, and the form attributes of the webpage of the first kind are included in into the Equations of The Second Kind In the form attributes of the webpage of type, wherein, the list of the webpage of the list of the webpage of the first kind and the Second Type It is the list of non-JavaScript types;
The webpage that the webpage transcoding server is additionally operable to change the Second Type after form attributes is sent to browser, and When receiving the browser according to the transmission list submission request of the form attributes of the webpage of amended Second Type, the use of transmission The form attributes of the form data of family input and the webpage of the first kind;
The webpage transcoding server is additionally operable to the form data and first according to the list for receiving submits acquisition request to The form attributes of the webpage of type, and the form data is committed to institute according to the form attributes of the webpage of the first kind State Website server, and the first kind that the Website server is formed according to the form data response webpage transcoding To be sent to the client browser after the response webpage of Equations of The Second Kind.
CN201410855598.2A 2014-12-31 2014-12-31 Webpage code-transferring method, webpage transcoding device and Web browsing system Expired - Fee Related CN105512160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410855598.2A CN105512160B (en) 2014-12-31 2014-12-31 Webpage code-transferring method, webpage transcoding device and Web browsing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410855598.2A CN105512160B (en) 2014-12-31 2014-12-31 Webpage code-transferring method, webpage transcoding device and Web browsing system

Publications (2)

Publication Number Publication Date
CN105512160A CN105512160A (en) 2016-04-20
CN105512160B true CN105512160B (en) 2017-06-16

Family

ID=55720144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410855598.2A Expired - Fee Related CN105512160B (en) 2014-12-31 2014-12-31 Webpage code-transferring method, webpage transcoding device and Web browsing system

Country Status (1)

Country Link
CN (1) CN105512160B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166981B (en) * 2011-12-08 2017-12-12 腾讯科技(深圳)有限公司 A kind of radio web page code-transferring method and device
CN103309905A (en) * 2012-03-16 2013-09-18 百度在线网络技术(北京)有限公司 Method for transcoding, combining and reading web pages
CN102902802B (en) * 2012-10-12 2016-06-01 北京奇虎科技有限公司 A kind of webpage code-transferring method and device
CN103347056B (en) * 2013-06-19 2016-12-28 百度在线网络技术(北京)有限公司 The Web access method of mobile terminal, system and server

Also Published As

Publication number Publication date
CN105512160A (en) 2016-04-20

Similar Documents

Publication Publication Date Title
KR102185864B1 (en) Server-side rendering method and system of native content for presentation
CA2687483C (en) Method and system for desktop tagging of a web page
US10120847B2 (en) Methods for transforming requests for web content and devices thereof
US20090024719A1 (en) Methods and apparatus for enabling use of web content on various types of devices
CN104426925B (en) Web page resources acquisition methods and device
JP2018536233A (en) Method and system for generating wigwig web content
CN101860533A (en) Data transmission method based on C/S architecture browser and server
JP2009531793A (en) System and method for converting web community and web application data
WO2005003998A1 (en) A method and system for improving presentation of html pages in web devices
CN103383687A (en) Page processing method and device
TW201800962A (en) Webpage file sending method, webpage rendering method and device and webpage rendering system
WO2022048141A1 (en) Image processing method and apparatus, and computer readable storage medium
CN106980698A (en) Browser static resource loading method, browser program and readable storage medium storing program for executing
JP5309121B2 (en) Information processing method, program, information processing system
CN103559194B (en) A kind of searching method, server, system
CN102253986A (en) Method and device for improving webpage displaying effect in multiple terminals
Krause Introducing Web Development
US20160350299A1 (en) Image as database
CN102681848B (en) Develop in microtec mode and the method for accessed web page, device, terminal and system
US10095791B2 (en) Information search method and apparatus
CN105354269B (en) Web applicational language Localization methodologies and system based on reverse proxy and information filtering
JP2008071116A (en) Information delivery system, information delivery device, information delivery method and information delivery program
CN105512160B (en) Webpage code-transferring method, webpage transcoding device and Web browsing system
US8321535B2 (en) Web services integration systems and methods
US11403361B2 (en) Identifying code dependencies in web applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200609

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 12 layer self unit 01

Patentee before: GUANGZHOU SHENMA MOBILE INFORMATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170616

CF01 Termination of patent right due to non-payment of annual fee