Movatterモバイル変換


[0]ホーム

URL:


CN104239407B - A kind of method and apparatus for showing webpage - Google Patents

A kind of method and apparatus for showing webpage
Download PDF

Info

Publication number
CN104239407B
CN104239407BCN201410373296.1ACN201410373296ACN104239407BCN 104239407 BCN104239407 BCN 104239407BCN 201410373296 ACN201410373296 ACN 201410373296ACN 104239407 BCN104239407 BCN 104239407B
Authority
CN
China
Prior art keywords
attribute
webpage
code
web page
multiple labels
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.)
Active
Application number
CN201410373296.1A
Other languages
Chinese (zh)
Other versions
CN104239407A (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi IncfiledCriticalXiaomi Inc
Priority to CN201410373296.1ApriorityCriticalpatent/CN104239407B/en
Publication of CN104239407ApublicationCriticalpatent/CN104239407A/en
Application grantedgrantedCritical
Publication of CN104239407BpublicationCriticalpatent/CN104239407B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The disclosure is directed to a kind of method and apparatus for showing webpage, belong to Internet technical field.The method includes:Receive web page code and the attribute scripted code that server is sent;The web page code is performed, to open the basic framework of webpage;Wherein, multiple labels are included in the webpage, the specific label property value of the multiple label is not included in the web page code, the attribute scripted code is used to set the specific label attribute for the multiple labels for being not provided with specific label attribute in the web page code;The attribute scripted code is performed, to set the specific label attribute of multiple labels described in the basic framework of the webpage, and shows the webpage after setting specific label attribute.Using the disclosure, it is possible to reduce network resources waste.

Description

A kind of method and apparatus for showing webpage
Technical field
This disclosure relates to Internet technical field, more particularly to a kind of method and device for showing webpage.
Background technology
With the development of Internet technology, the content in webpage becomes increasingly to enrich, and at the same time browser needs to addThe web data from server carried also becomes more and more, and with the arrival in mobile Internet epoch, more and moreUser begin to use mobile terminal equipment browse webpage, how in the case where not influencing user's browsed web content, subtractThe loading velocity of webpage is accelerated in the transmission of few web data, becomes the direction of technical staff's research.
The method that some data volumes for reducing web data are provided in the relevant technologies, will need to pass in advance in server endThe symbol that newline, tab, space in defeated web page code etc. do not influence webpage content display removes, unnecessary to reduceData transmission.
Above-mentioned the relevant technologies have at least the following problems:
The compressed webpage data by the way of additional character is removed, compression effectiveness unobvious, usually the method canIt is very limited with the ratio of compression, so, by the above method, treated that web data still has that data volume is larger to askTopic, so as to cause the data volume transmitted in web page loading process excessive, cause network resources waste.
Invention content
In order to solve the problems, such as the relevant technologies, present disclose provides a kind of method and apparatus for showing webpage.InstituteIt is as follows to state technical solution:
According to the embodiment of the present disclosure in a first aspect, provide it is a kind of show webpage method, the method includes:
Receive web page code and the attribute scripted code that server is sent;
The web page code is performed, to open the basic framework of webpage;
Wherein, multiple labels are included in the webpage, the specific mark of the multiple label is not included in the web page codeProperty value is signed, the attribute scripted code is used to set for the multiple labels for being not provided with specific label attribute in the web page codePut the specific label attribute;
The attribute scripted code is performed, to set the specific label of multiple labels described in the basic framework of the webpageAttribute, and show the webpage after setting specific label attribute.
Optionally, it is described to receive web page code and the attribute scripted code that server is sent, including:
Receive the web page code for including attribute scripted code that server is sent;
Or, the web page code that server is sent is received, corresponding category is obtained to the server according to the web page codeProperty scripted code.
Optionally, it is described to perform the attribute scripted code, to set multiple marks described in the basic framework of the webpageThe specific label attribute of label, including:
Perform the first script sentence in the attribute scripted code;
First script sentence is used for the multiple labels that will have the first tag name in the basic framework of the webpageFirst tag attributes are set as identical preset attribute value.
Optionally, it is described to perform the attribute scripted code, to set multiple marks described in the basic framework of the webpageThe specific label attribute of label, including:
Perform the second script sentence in the attribute scripted code;
Second script sentence is used for the multiple labels that will have the second tag name in the basic framework of the webpageSecond tag attributes are respectively set to multiple and different preset attribute values.
Optionally,
Second script sentence is additionally operable to:To there are multiple labels of the second tag name in the basic framework of the webpageThe second tag attributes be respectively set to preset value in preset group;Wherein, each preset value in the preset group pointNot Dui Ying in multiple labels with the second tag name each label the second tag attribute values.
According to the second aspect of the embodiment of the present disclosure, a kind of device for showing webpage is provided, described device includes:
Receiving module, for receiving the web page code and attribute scripted code of server transmission;
First execution module, for performing the web page code that the receiving module receives, to open the basic of webpageFrame;
Wherein, multiple labels are included in the webpage, the specific mark of the multiple label is not included in the web page codeProperty value is signed, the attribute scripted code is used to set for the multiple labels for being not provided with specific label attribute in the web page codePut the specific label attribute;
Second execution module, for performing the attribute scripted code that the receiving module receives, to set described theThe specific label attribute of multiple labels described in the basic framework for the webpage that one execution module is opened, and show setting specific labelWebpage after attribute.
Optionally, the receiving module, is used for:
Receive the web page code for including attribute scripted code that server is sent;
Or, the web page code that server is sent is received, corresponding category is obtained to the server according to the web page codeProperty scripted code.
Optionally, second execution module, is used for:
Perform the first script sentence in the attribute scripted code that the receiving module receives;
First script sentence is used in the basic framework that first execution module is performed to the webpage openedFirst tag attributes of multiple labels with the first tag name are set as identical preset attribute value.
Optionally, second execution module, is used for:
Perform the second script sentence in the attribute scripted code that the receiving module receives;
Second script sentence is used in the basic framework that first execution module is performed to the webpage openedSecond tag attributes of multiple labels with the second tag name are respectively set to multiple and different preset attribute values.
Optionally,
Second script sentence is additionally operable to:To there are multiple labels of the second tag name in the basic framework of the webpageThe second tag attributes be respectively set to preset value in preset group;Wherein, each preset value in the preset group pointNot Dui Ying in multiple labels with the second tag name each label the second tag attribute values.
According to the third aspect of the embodiment of the present disclosure, a kind of device for showing webpage is provided, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Receive web page code and the attribute scripted code that server is sent;
The web page code is performed, to open the basic framework of webpage;
Wherein, multiple labels are included in the webpage, the specific mark of the multiple label is not included in the web page codeProperty value is signed, the attribute scripted code is used to set for the multiple labels for being not provided with specific label attribute in the web page codePut the specific label attribute;
The attribute scripted code is performed, to set the specific label of multiple labels described in the basic framework of the webpageAttribute, and show the webpage after setting specific label attribute.
The technical scheme provided by this disclosed embodiment can include the following benefits:
In the embodiment of the present disclosure, web page code and attribute scripted code that server is sent are received, performs web page code, withThe basic framework of webpage is opened, wherein, multiple labels are included in webpage, the specific mark of this multiple label is not included in web page codeProperty value is signed, attribute scripted code is used for specific for this multiple label setting for being not provided with specific label attribute in web page codeTag attributes perform attribute scripted code, to set the specific label attribute of the multiple labels of this in the basic framework of webpage, and showShow the webpage after setting specific label attribute.Processing method in this way allows server end before web page code is transmittedRemove a certain tag attributes of the identical multiple labels of tag name, the polishing in webpage is gone by attribute scripted code by end sideThe tag attributes removed, in this way, it is possible to reduce data volume from server to terminal transmission, it is thus possible to reduce network resources waste.
It should be understood that above general description and following detailed description are only exemplary and explanatory, notThe disclosure can be limited.
Description of the drawings
Attached drawing herein is incorporated into specification and forms the part of this specification, shows the implementation for meeting the disclosureExample, and for explaining the principle of the disclosure together with specification.In the accompanying drawings:
Fig. 1 is the flow chart according to a kind of method of display webpage shown in an exemplary embodiment;
Fig. 2 is the schematic diagram according to a kind of web page code shown in an exemplary embodiment;
Fig. 3 is the schematic diagram according to a kind of device of display webpage shown in an exemplary embodiment;
Fig. 4 is the structure diagram according to a kind of terminal shown in an exemplary embodiment.
Pass through above-mentioned attached drawing, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawingsThe range for limiting the disclosure by any mode and conceiving is not intended to word description, but is by reference to specific embodimentThose skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, example is illustrated in the accompanying drawings.Following description is related toDuring attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar element.Following exemplary embodimentDescribed in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appendedThe example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Embodiment one
The embodiment of the present disclosure provides a kind of method for showing webpage, as shown in Figure 1, the process flow of this method can wrapInclude the steps:
In a step 101, web page code and the attribute scripted code that server is sent are received.
In a step 102, web page code is performed, to open the basic framework of webpage.Wherein, multiple marks are included in webpageIt signs, the specific label property value of this multiple label is not included in web page code, attribute scripted code is used for as in web page codeIt is not provided with multiple labels setting specific label attribute of specific label attribute.
In step 103, attribute scripted code is performed, to set the specific label of multiple labels in the basic framework of webpageAttribute, and show the webpage after setting specific label attribute.
In the embodiment of the present disclosure, web page code and attribute scripted code that server is sent are received, performs web page code, withThe basic framework of webpage is opened, wherein, multiple labels are included in webpage, the specific mark of this multiple label is not included in web page codeProperty value is signed, attribute scripted code is used for specific for this multiple label setting for being not provided with specific label attribute in web page codeTag attributes perform attribute scripted code, to set the specific label attribute of the multiple labels of this in the basic framework of webpage, and showShow the webpage after setting specific label attribute.Processing method in this way allows server end before web page code is transmittedRemove a certain tag attributes of the identical multiple labels of tag name, the polishing in webpage is gone by attribute scripted code by end sideThe tag attributes removed, in this way, it is possible to reduce data volume from server to terminal transmission, it is thus possible to reduce network resources waste.
Embodiment two
The embodiment of the present disclosure provides a kind of method for showing webpage, and the executive agent of this method can be to be equipped with browsingDevice and the terminal with network transmission function, which can be computer, mobile phone etc..
Below in conjunction with embodiment, process flow shown in FIG. 1 is described in detail, content can be as follows:
In a step 101, web page code and the attribute scripted code that server is sent are received.
Wherein, attribute scripted code is that browser can identify simultaneously execution script code, for the basic subrack for webpageFrame tags attribute.Web page code can be the code for the basic framework for being used to open webpage, and the basic framework of webpage is the absence ofThe webpages of some tag attributes.This web page code can be the web page code deleted after predetermined symbol, and predetermined symbol can beNewline, tab, space etc. do not influence the symbol of webpage content display.
In force, the server of website can compress the original web page code of webpage, can be in original web pageIn code, multiple labels with same tag attributes are determined, for example, as shown in Fig. 2, multiple labels all have target (meshMark) attribute.Then, the identical tag attributes are deleted in this multiple label, and identical tag name is set for these labels,For example, as shown in Fig. 2, delete label in target=" _ blank ", the tag name of these labels is both configured to a.This phaseWith property value of the tag attributes in multiple labels can be identical, such as the target attributes in Fig. 2, can also be different, such as Fig. 2In herf attributes.Furthermore it is possible to attribute scripted code is generated, wherein comprising script sentence (can be referred to as attribute addition sentence),For being that the tag attributes of above-mentioned deletion add property value in above-mentioned multiple labels, which is the attribute of above-mentioned deletionValue, for example, the script sentence can be:$(‘a’).attr(‘target’,‘_blank’).If delete a variety of label categoriesProperty, then each tag attributes is corresponded to, an attribute addition sentence can be set.
The process of above-mentioned compressed webpage code can also be carried out by technical staff during web page code is write, canDirectly to save above-mentioned identical tag attributes in web page code, and identical tag name is set for corresponding label, simultaneouslyCorresponding script sentence is set in attribute scripted code.Attribute scripted code can be mutual indepedent with web page code, and is takingIt is engaged in corresponding to storage in device, alternatively, attribute scripted code can also be a part for web page code.
When user wants to browse some webpage, can click the link of the webpage or in the address field of browser it is defeatedEnter the network address of the webpage and click to determine, terminal then can send web-page requests to corresponding server, and server is receiving netAfter page request, the web page code of the webpage and attribute scripted code can be sent to terminal.Transmit web page code and attribute scriptThe mode of code can be varied, correspondingly, several feasible processing modes following present step 101:
Mode one receives the web page code for including attribute scripted code that server is sent.
In force, attribute scripted code can be arranged in corresponding web page code, server will include attributeThe web page code of scripted code is sent to terminal, and terminal can first carry out attribute therein during web page code is performedScripted code is that the basic framework of webpage adds corresponding tag attributes.
Mode two receives the web page code that server is sent, and corresponding attribute foot is obtained to server according to web page codeThis code.
In force, corresponding sentence can be provided in web page code, for obtaining corresponding attribute foot to serverThis code.Terminal can perform web page code after web page code is received, when going to the sentence, then can trigger toServer sends script request, to obtain the corresponding attribute scripted code of the web page code.
In a step 102, web page code is performed, to open the basic framework of webpage.
Wherein, multiple labels are included in webpage, the specific label property value of this multiple label is not included in web page code, is belonged toProperty scripted code be used to set specific label attribute for the multiple labels for being not provided with specific label attribute in web page code.
In force, terminal can perform web page code after web page code is received, to carry out the display of webpageJourney, can show the basic framework of webpage by the web page code, and not complete webpage, in the basic framework of the webpage,Lack the specific label attribute of certain labels.
In step 103, attribute scripted code is performed, to set the specific label of multiple labels in the basic framework of webpageAttribute, and show the webpage after setting specific label attribute.
In force, terminal can perform attribute foot during the basic framework for performing web page code opening webpageAttribute addition sentence in this code, tag attributes are set for the label of the same name in the basic framework of webpage.Attribute scripted codeIn can include one or more attributes and add sentences, $ (' a ') .attr as escribed above (' target ', ' _ blank ') belongs toProperty addition sentence can call DOM (Document Object Model, DOM Document Object Model) API of browser(Application Programming Interface, application programming interfaces) interface is of the same name in the basic framework of webpageLabel sets tag attributes.Each attribute addition sentence can mark some of a kind of label (label of i.e. same tag name)The property value of label attribute is set as the property value specified, and could be provided as same alike result value, may be set to be different attribute value.By the setting of tag attributes in the basic framework to webpage, can be supplied on the basis of the basic framework of webpage, withShow complete webpage.
Optionally, attribute scripted code sets the mode of tag attributes can be a variety of for the label in the basic framework of webpageVarious and different mode can be applied in combination, and following present several feasible processing modes:
Mode one, performs the first script sentence in attribute scripted code, and the first script sentence is used for the basic of webpageThe first tag attributes of multiple labels with the first tag name are set as identical preset attribute value in frame.
Wherein, the first tag name can be arbitrary tag name.First tag attributes can be arbitrary tag attributes.
In force, in server side, if in web page code multiple labels some tag attributes (i.e. above-mentioned firstTag attributes, such as target attributes) property value it is identical, then can the first tag name be set for multiple labels thus.Then by thisThe tag attributes in a little labels are deleted, for example, in web page code as shown in Figure 2, can delete multiple labelsTarget attributes.The first script sentence is set in attribute scripted code simultaneously, the first script sentence can be by the basic of webpageThe first tag attributes of multiple labels with the first tag name are set as identical preset attribute value, the preset attribute in frameIt is worth the property value for above-mentioned deletion, which adds sentence for attribute.For example, in web page code shown in Fig. 2Target attributes are deleted, corresponding first script sentence can be (' a ') .attr (' target ', ' _ blank '), Ji JiangbiaoIt signs and is set as _ blank for the property value of the target attributes of the label of a.
In end side, the first script sentence is performed, then the tag attributes of above-mentioned deletion can be added to the basic of webpageIn the respective labels of frame.The setting of the tag attributes of label of the same name is completed using such one section simple script sentence, it can be withRemove a large amount of duplicated code from.
Optionally, in attribute scripted code, property value can be carried with a variable, correspondingly, the first script sentenceIn property value can then be substituted for the variable, for example, Var b=' _ blank ', corresponding script sentence can also become $(‘a’).attr(‘target’,b)。
Mode two, performs the second script sentence in attribute scripted code, and the second script sentence is used for the basic of webpageThe second tag attributes of multiple labels with the second tag name are respectively set to multiple and different preset attribute values in frame.
Wherein, the second tag name can be arbitrary tag name.Second tag attributes can be arbitrary tag attributes.
In force, in server side, if multiple labels are all (i.e. above-mentioned with same tag attributes in web page codeSecond tag attributes, such as href attributes), then the tag name of this multiple label can be set as the second tag name.Then by thisThe tag attributes in a little labels are deleted, for example, in web page code as shown in Figure 2, can delete the href of multiple labelsAttribute.The second script sentence is set in attribute scripted code simultaneously, the second script sentence can will be in the basic framework of webpageSecond tag attributes of multiple labels with the second tag name are respectively set to multiple preset attribute values, which isThe property value of above-mentioned deletion, multiple preset attribute values can be the same or different, which adds language for attributeSentence.
In end side, the second script sentence is performed, then the tag attributes of above-mentioned deletion can be added to the basic of webpageIn the respective labels of frame.The setting of the tag attributes of label of the same name is completed using such one section simple script sentence, it can be withRemove a large amount of duplicated code from.
Optionally, the tag attributes setting up procedure in mode two can be completed by array, and corresponding processing procedure can be withIt is:Second script sentence is additionally operable to the second tag attributes of multiple labels with the second tag name in the basic framework by webpageThe preset value being respectively set in preset group;Wherein, each preset value in preset group is corresponding respectively has the second labelSecond tag attribute values of each label in multiple labels of name.
In force, in server side, the second of above-mentioned deletion can be obtained by sequence vertical in web page codeThe property value of tag attributes sets array assignment statement in attribute scripted code before the second script sentence, by the category of acquisitionProperty value is assigned a value of each element (i.e. above-mentioned preset value) in array (i.e. above-mentioned preset group) in order, for example, shown in Fig. 2In web page code, href attributes are deleted, sentence Var h=[http can be set in attribute scripted code accordingly://www.qq.com,http://news.qq.com,http://sports.qq.com,http://ent.qq.com,http://v.qq.com,http://finance.qq.com,http://finance.qq.com/stock/,http://auto.qq.com,http://house.qq.com,http://tech.qq.com,http://digi.qq.com,http://games.qq.com,http://edu.qq.com,http://fashion.qq.com/,http://cul.qq.com], to buildVertical array h, corresponding second script sentence can be (' a ') .attr (' href ', h), i.e., by web page code from front to backSequence, the property value of the href attributes for the label that tag name in the basic framework of webpage is a is set as each member in array hElement value.
In the embodiment of the present disclosure, web page code and attribute scripted code that server is sent are received, performs web page code, withThe basic framework of webpage is opened, wherein, multiple labels are included in webpage, the specific mark of this multiple label is not included in web page codeProperty value is signed, attribute scripted code is used for specific for this multiple label setting for being not provided with specific label attribute in web page codeTag attributes perform attribute scripted code, to set the specific label attribute of the multiple labels of this in the basic framework of webpage, and showShow the webpage after setting specific label attribute.Processing method in this way allows server end before web page code is transmittedRemove a certain tag attributes of the identical multiple labels of tag name, the polishing in webpage is gone by attribute scripted code by end sideThe tag attributes removed, in this way, it is possible to reduce data volume from server to terminal transmission, it is thus possible to reduce network resources waste.
Embodiment three
Based on identical technical concept, the embodiment of the present disclosure additionally provides a kind of device for showing webpage, as shown in figure 3,The device includes:Receiving module 310, the first execution module 320 and the second execution module 330.
Receiving module 310 is configured as receiving web page code and the attribute scripted code that server is sent;
First execution module 320 is configured as performing the web page code that the receiving module receives, to open webpageBasic framework;
Wherein, multiple labels are included in the webpage, the specific mark of the multiple label is not included in the web page codeProperty value is signed, the attribute scripted code is used to set for the multiple labels for being not provided with specific label attribute in the web page codePut the specific label attribute;
Second execution module 330 is configured as performing the attribute scripted code that the receiving module receives, with settingThe specific label attribute of multiple labels described in the basic framework for the webpage that first execution module is opened, and show that setting is specialDetermine the webpage after tag attributes.
Optionally, the receiving module 310, is configured as:
Receive the web page code for including attribute scripted code that server is sent;
Or, the web page code that server is sent is received, corresponding category is obtained to the server according to the web page codeProperty scripted code.
Optionally, second execution module 330, is configured as:
Perform the first script sentence in the attribute scripted code that the receiving module receives;
First script sentence is used in the basic framework that first execution module is performed to the webpage openedFirst tag attributes of multiple labels with the first tag name are set as identical preset attribute value.
Optionally, second execution module 330, is configured as:
Perform the second script sentence in the attribute scripted code that the receiving module receives;
Second script sentence is used in the basic framework that first execution module is performed to the webpage openedSecond tag attributes of multiple labels with the second tag name are respectively set to multiple and different preset attribute values.
Optionally,
Second script sentence is additionally operable to:To there are multiple labels of the second tag name in the basic framework of the webpageThe second tag attributes be respectively set to preset value in preset group;Wherein, each preset value in the preset group pointNot Dui Ying in multiple labels with the second tag name each label the second tag attribute values.
In the embodiment of the present disclosure, web page code and attribute scripted code that server is sent are received, performs web page code, withThe basic framework of webpage is opened, wherein, multiple labels are included in webpage, the specific mark of this multiple label is not included in web page codeProperty value is signed, attribute scripted code is used for specific for this multiple label setting for being not provided with specific label attribute in web page codeTag attributes perform attribute scripted code, to set the specific label attribute of the multiple labels of this in the basic framework of webpage, and showShow the webpage after setting specific label attribute.Processing method in this way allows server end before web page code is transmittedRemove a certain tag attributes of the identical multiple labels of tag name, the polishing in webpage is gone by attribute scripted code by end sideThe tag attributes removed, in this way, it is possible to reduce data volume from server to terminal transmission, it is thus possible to reduce network resources waste.
It should be noted that:The device of display webpage that above-described embodiment provides is when showing webpage, only with above-mentioned each work(Can module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different functionsModule is completed, i.e., the internal structure of device is divided into different function modules, described above all or part of to completeFunction.In addition, the device for the display webpage that above-described embodiment provides and the embodiment of the method for display webpage belong to same design,Specific implementation process refers to embodiment of the method, and which is not described herein again.
Example IV
Fig. 4 is the structure diagram according to a kind of terminal shown in an exemplary embodiment.The terminal can be computer,Mobile phone etc..
With reference to Fig. 4, audio output apparatus 400 can include following one or more components:Processing component 402, memory404, power supply module 406, multimedia component 408, audio component 410, the interface 412 of input/output (I/O), sensor module414 and communication component 416.
Processing component 402 usually control audio output apparatus 400 integrated operation, such as with display, call, dataCommunication, camera operation and record operate associated operation.Processing element 402 can be including one or more processors 420Execute instruction, to perform all or part of the steps of the methods described above.In addition, processing component 402 can include one or moreModule, convenient for the interaction between processing component 402 and other assemblies.For example, processing component 402 can include multi-media module,To facilitate the interaction between multimedia component 408 and processing component 402.
Memory 404 is configured as storing various types of data to support the operation in audio output apparatus 400.TheseThe example of data includes the instruction of any application program or method for being operated on audio output apparatus 400, contacts numberAccording to, telephone book data, message, picture, video etc..Memory 404 can be by any kind of volatibility or non-volatile memoriesEquipment or combination thereof are realized, such as static RAM (SRAM), electrically erasable programmable read-only memory(EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only memory(ROM), magnetic memory, flash memory, disk or CD.
Electric power assembly 406 provides electric power for the various assemblies of audio output apparatus 400.Electric power assembly 406 can include electricityManagement system, one or more power supplys and other generate, manage and to distribute electric power associated with for audio output apparatus 400Component.
Multimedia component 408 is included in one output interface of offer between the audio output apparatus 400 and userScreen.In some embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touchingPanel is touched, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or moreTouch sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch orThe boundary of sliding action, but also detect duration and pressure associated with the touch or slide operation.In some implementationsIn example, multimedia component 408 includes a front camera and/or rear camera.When audio output apparatus 400 is in operationPattern, during such as screening-mode or video mode, front camera and/or rear camera can receive external multimedia numberAccording to.Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoomAbility.
Audio component 410 is configured as output and/or input audio signal.For example, audio component 410 includes a MikeWind (MIC), when audio output apparatus 400 is in operation mode, during such as call model, logging mode and speech recognition mode, wheatGram wind is configured as receiving external audio signal.The received audio signal can be further stored in memory 404 or warpIt is sent by communication component 416.In some embodiments, audio component 410 further includes a loud speaker, for exporting audio letterNumber.
I/O interfaces 412 provide interface between processing component 402 and peripheral interface module, and above-mentioned peripheral interface module canTo be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lockDetermine button.
Sensor module 414 includes one or more sensors, for providing various aspects for audio output apparatus 400Status assessment.For example, sensor module 414 can detect opening/closed state of audio output apparatus 400, the phase of componentTo positioning, such as the display and keypad that the component is audio output apparatus 400, sensor module 414 can also detectThe position change of 400 1 components of audio output apparatus 400 or audio output apparatus, user contact with audio output apparatus 400Existence or non-existence, 400 orientation of audio output apparatus or acceleration/deceleration and the temperature change of audio output apparatus 400.SensingDevice assembly 414 can include proximity sensor, be configured to detect depositing for neighbouring object without any physical contact.Sensor module 414 can also include optical sensor, such as CMOS or ccd image sensor, for making in imaging applicationsWith.In some embodiments, which can also include acceleration transducer, gyro sensor, magnetic sensingDevice, pressure sensor or temperature sensor.
Communication component 416 is configured to facilitate wired or wireless way between audio output apparatus 400 and other equipmentCommunication.Audio output apparatus 400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their groupIt closes.In one exemplary embodiment, communication component 416 receives the broadcast from external broadcasting management system via broadcast channelSignal or broadcast related information.In one exemplary embodiment, the communication component 416 further includes near-field communication (NFC) mouldBlock, to promote short range communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) skill can be based in NFC moduleArt, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, audio output apparatus 400 can be by one or more application application-specific integrated circuit(ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), scene canIt programs gate array (FPGA), controller, microcontroller, microprocessor or other electronic components to realize, for performing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally providedSuch as include the memory 404 of instruction, above-metioned instruction can be performed to complete above-mentioned side by the processor 420 of audio output apparatus 400Method.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, magneticBand, floppy disk and optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is held by the processor of terminalDuring row so that terminal is able to carry out a kind of method for showing webpage, and this method includes:
Receive web page code and the attribute scripted code that server is sent;
The web page code is performed, to open the basic framework of webpage;
Wherein, multiple labels are included in the webpage, the specific mark of the multiple label is not included in the web page codeProperty value is signed, the attribute scripted code is used to set for the multiple labels for being not provided with specific label attribute in the web page codePut the specific label attribute;
The attribute scripted code is performed, to set the specific label of multiple labels described in the basic framework of the webpageAttribute, and show the webpage after setting specific label attribute.
Optionally, it is described to receive web page code and the attribute scripted code that server is sent, including:
Receive the web page code for including attribute scripted code that server is sent;
Or, the web page code that server is sent is received, corresponding category is obtained to the server according to the web page codeProperty scripted code.
Optionally, it is described to perform the attribute scripted code, to set multiple marks described in the basic framework of the webpageThe specific label attribute of label, including:
Perform the first script sentence in the attribute scripted code;
First script sentence is used for the multiple labels that will have the first tag name in the basic framework of the webpageFirst tag attributes are set as identical preset attribute value.
Optionally, it is described to perform the attribute scripted code, to set multiple marks described in the basic framework of the webpageThe specific label attribute of label, including:
Perform the second script sentence in the attribute scripted code;
Second script sentence is used for the multiple labels that will have the second tag name in the basic framework of the webpageSecond tag attributes are respectively set to multiple and different preset attribute values.
Optionally,
Second script sentence is additionally operable to:To there are multiple labels of the second tag name in the basic framework of the webpageThe second tag attributes be respectively set to preset value in preset group;Wherein, each preset value in the preset group pointNot Dui Ying in multiple labels with the second tag name each label the second tag attribute values.
In the embodiment of the present disclosure, web page code and attribute scripted code that server is sent are received, performs web page code, withThe basic framework of webpage is opened, wherein, multiple labels are included in webpage, the specific mark of this multiple label is not included in web page codeProperty value is signed, attribute scripted code is used for specific for this multiple label setting for being not provided with specific label attribute in web page codeTag attributes perform attribute scripted code, to set the specific label attribute of the multiple labels of this in the basic framework of webpage, and showShow the webpage after setting specific label attribute.Processing method in this way allows server end before web page code is transmittedRemove a certain tag attributes of the identical multiple labels of tag name, the polishing in webpage is gone by attribute scripted code by end sideThe tag attributes removed, in this way, it is possible to reduce data volume from server to terminal transmission, it is thus possible to reduce network resources waste.
Those skilled in the art will readily occur to the disclosure its after considering specification and putting into practice disclosure disclosed hereinIts embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes orPerson's adaptive change follows the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosureOr conventional techniques.Description and embodiments are considered only as illustratively, and the true scope and spirit of the disclosure are by followingClaim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, andAnd various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by appended claim.

Claims (9)

CN201410373296.1A2014-07-312014-07-31A kind of method and apparatus for showing webpageActiveCN104239407B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201410373296.1ACN104239407B (en)2014-07-312014-07-31A kind of method and apparatus for showing webpage

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410373296.1ACN104239407B (en)2014-07-312014-07-31A kind of method and apparatus for showing webpage

Publications (2)

Publication NumberPublication Date
CN104239407A CN104239407A (en)2014-12-24
CN104239407Btrue CN104239407B (en)2018-06-08

Family

ID=52227469

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410373296.1AActiveCN104239407B (en)2014-07-312014-07-31A kind of method and apparatus for showing webpage

Country Status (1)

CountryLink
CN (1)CN104239407B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104750793A (en)*2015-03-122015-07-01小米科技有限责任公司Method and device for generating page tables
CN108153663B (en)*2016-12-022022-02-18阿里巴巴集团控股有限公司Page data processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101639853A (en)*2009-08-262010-02-03王建军Text display method used for household electrical appliance terminal
CN101706821A (en)*2009-12-102010-05-12中兴通讯股份有限公司Tag-based mobile internet page design system and method
CN103279541A (en)*2013-06-042013-09-04天津市天安怡和信息技术有限公司Method and device for reducing web browser load

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101639853A (en)*2009-08-262010-02-03王建军Text display method used for household electrical appliance terminal
CN101706821A (en)*2009-12-102010-05-12中兴通讯股份有限公司Tag-based mobile internet page design system and method
CN103279541A (en)*2013-06-042013-09-04天津市天安怡和信息技术有限公司Method and device for reducing web browser load

Also Published As

Publication numberPublication date
CN104239407A (en)2014-12-24

Similar Documents

PublicationPublication DateTitle
CN106250133A (en)message display method, device and equipment
CN103914523A (en)Page rollback controlling method and page rollback controlling device
CN104111720B (en)Control method of electronic device, device and electronic equipment
CN104536935B (en)Calculate display methods, calculate edit methods and device
CN104778405B (en)Ad blocking method and device
CN103914502A (en)Method for intelligent search service using situation recognition and terminal thereof
CN103885712B (en)Webpage method of adjustment, device and electronic equipment
CN103870551B (en)The method and apparatus that a kind of cross-domain data obtains
CN107885571B (en)Display page control method and device
WO2017156983A1 (en)List callup method and device
CN113849092A (en)Content sharing method and device and electronic equipment
CN114547436A (en)Page display method and device, electronic equipment and storage medium
CN105955808B (en)The task management method and device of instant messaging application
CN106708967A (en)Page display method and device
JP7187491B2 (en) Information display method, device and medium
CN107168969A (en)A kind of page elements control method, device and electronic equipment
CN104951445B (en)Webpage processing method and device
CN110020361A (en)A kind of web page processing method, device, storage medium and electronic equipment
CN104239407B (en)A kind of method and apparatus for showing webpage
CN105653658B (en)Information displaying method and device
CN113918661A (en) Knowledge graph generation method, device and electronic device
CN105117115A (en)Method and device for displaying electronic document
CN105653058B (en)The creation of input method dictionary and loading method, device, terminal and server
CN105468606A (en)Webpage saving method and device
CN104156387B (en)Display methods and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp