CN108874875A - The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal - Google Patents
The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal Download PDFInfo
- Publication number
- CN108874875A CN108874875A CN201810403879.2A CN201810403879A CN108874875A CN 108874875 A CN108874875 A CN 108874875A CN 201810403879 A CN201810403879 A CN 201810403879A CN 108874875 A CN108874875 A CN 108874875A
- Authority
- CN
- China
- Prior art keywords
- target
- embedded
- webpage
- content
- web page
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Abstract
The invention discloses a kind of asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminals.Wherein, the asynchronous loading method of the web page contents includes:Load web page contents;Judge webpage whether loaded;If the determination result is YES, then the corresponding target position of target content to be embedded in webpage is obtained;Obtain target embedded code corresponding with target content to be embedded;Target content to be embedded is loaded into target position by performance objective embedded code.The embodiment of the present invention solves the technical issues of how realizing web page contents asynchronous load by the technical solution, and by asynchronous load, is also easy to that target content to be embedded is controlled and managed.
Description
Technical field
The present invention relates to a kind of Internet technical field, more particularly to a kind of asynchronous loading method of web page contents, device,
Readable storage medium storing program for executing and terminal.
Background technique
In practical applications, in order to meet actual demand, it is sometimes desirable to which some position in webpage is embedded in be embedded
Hold, for example, advertisement or certain using it is corresponding link etc..
In the prior art, usually that content to be embedded is corresponding embedding to be embedded in content to be embedded in a certain webpage
Enter code, be written to the appropriate location of the corresponding service code of the webpage, the business generation of write-in embedded code is executed to browser
When code, the webpage for being embedded in content to be embedded is loaded out, just to realize simultaneous display.
Wherein, browser is to load webpage, under normal circumstances, the general position of content to be embedded according to the sequencing of code
In the middle top of webpage, this means that embedded code is located at position forward in service code, then, browser will be according to
The sequencing of code first carries out embedded code, then executes service code, alternatively, first carrying out a part of service code, then executes
Embedded code finally executes subsequent service code again.If occurring exception when executing embedded code, follow-up business will be influenced
The execution of code, thus causes webpage not load out, to affect display effect.
Therefore, the prior art haves the defects that cannot achieve the asynchronous load of web page contents.
Summary of the invention
The technical problem to be solved by the present invention is to provide a kind of asynchronous loading methods of web page contents, device, readable storage medium storing program for executing
And terminal, to solve the technical issues of how realizing web page contents asynchronous load.
To achieve the goals above, the first aspect of the present invention provides following technical scheme:
A kind of asynchronous loading method of web page contents, the method includes:
Load the web page contents;
Judge webpage whether loaded;
If the determination result is YES, then the corresponding target position of target content to be embedded in the webpage is obtained;
Obtain target embedded code corresponding with target content to be embedded;
The target embedded code is executed, target content to be embedded is loaded into the target position.
Further, it is described judge webpage whether loaded the step of, specifically include:
The load progress of webpage described in real-time monitoring;
According to real-time monitoring as a result, judge the webpage whether loaded.
Further, described the step of obtaining the corresponding target position of target content to be embedded in the webpage, specific to wrap
It includes:
In the corresponding service code of the webpage, target placeholder is obtained;
According to the target placeholder, the target placeholder corresponding position in the webpage is obtained, and will be described
Target placeholder corresponding position in the webpage, as the corresponding mesh of the content to be embedded of target described in the webpage
Cursor position.
Further, the step of acquisition target embedded code corresponding with target content to be embedded, it is specific to wrap
It includes:
According to the corresponding relationship of preset embedded code and the target placeholder, and according to the target placeholder, obtain
Target embedded code corresponding with the target placeholder is taken, the target corresponding with the target placeholder is embedded in generation
Code, as the corresponding target embedded code of target content to be embedded.
Further, described to execute the target embedded code, target content to be embedded is loaded into the target
The step of position, specifically includes:
The target embedded code is converted, DOM Document Object Model DOM document is obtained;Wherein, the target insertion
Code includes document flow write operation interface;
The target embedded code is inserted into the target position by the document flow write operation interface;
Based on the DOM document, the target embedded code is replaced using target content to be embedded;Wherein, described
DOM document includes page elements, and the page elements include replacement attribute.
Further, target content to be embedded is advertisement.
To achieve the goals above, the second aspect of the present invention additionally provides following technical scheme:
A kind of asynchronous loading device of web page contents, described device include:
First loading module, for loading the web page contents;
Judgment module, for judge webpage whether loaded;
First obtains module, in the case where the judgment result is yes, obtaining target content to be embedded in the webpage
Corresponding target position;
Second obtains module, for obtaining target embedded code corresponding with target content to be embedded;
Target content to be embedded is loaded into described by the second loading module for executing the target embedded code
Target position.
Further, the judgment module is specifically used for:
The load progress of webpage described in real-time monitoring;
According to real-time monitoring as a result, judge the webpage whether loaded.
Further, the first acquisition module is specifically used for:
In the corresponding service code of the webpage, target placeholder is obtained;
According to the target placeholder, the target placeholder corresponding position in the webpage is obtained, and will be described
Target placeholder corresponding position in the webpage, as the corresponding mesh of the content to be embedded of target described in the webpage
Cursor position.
Further, the second acquisition module is specifically used for:
According to the corresponding relationship of preset embedded code and the target placeholder, and according to the target placeholder, obtain
Target embedded code corresponding with the target placeholder is taken, the target corresponding with the target placeholder is embedded in generation
Code, as the corresponding target embedded code of target content to be embedded.
Further, second loading module is specifically used for:
The target embedded code is converted, DOM DOM Document Object Model document is obtained;Wherein, the target insertion
Code includes document flow write operation interface;
The target embedded code is inserted into the target position by the document flow write operation interface;
Based on the DOM document, the target embedded code is replaced using target content to be embedded;Wherein, described
DOM document includes page elements, and the page elements include replacement attribute.
Further, target content to be embedded is advertisement.
To achieve the goals above, the third aspect of the present invention additionally provides following technical scheme:
A kind of asynchronous load hardware device of web page contents, including:
Memory, for storing non-transitory computer-readable instruction;And
Processor, for running the computer-readable instruction, so that realizing when the processor executes such as the present invention the
The asynchronous loading method of web page contents described in one side.
To achieve the goals above, the fourth aspect of the present invention additionally provides following technical scheme:
A kind of computer readable storage medium, for storing non-transitory computer-readable instruction, when the non-transitory
When computer-readable instruction is executed by computer, so that the computer executes web page contents as described in the first aspect of the invention
Asynchronous loading method.
To achieve the goals above, the fifth aspect of the present invention additionally provides following technical scheme:
A kind of asynchronous load terminal of web page contents, including the asynchronous load of a kind of web page contents described in second aspect of the present invention
Device.
The embodiment of the present invention provides a kind of asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal.Its
In, the asynchronous loading method of the web page contents includes:Load web page contents;Judge webpage whether loaded;If judging result is
It is then to obtain the corresponding target position of the content to be embedded of target in webpage;It is embedding to obtain target corresponding with target content to be embedded
Enter code;Target content to be embedded is loaded into target position by performance objective embedded code.
The embodiment of the present invention is both different from the limitation that the network platforms such as Yahoo are taken by taking the technical solution
Document flow write operation API is used in the page, is implanted directly into loading method also different from existing, code, but is being loaded net
After page, target embedded code corresponding with target content to be embedded is executed, target content to be embedded is loaded into mesh in webpage
Mark the corresponding target position of content to be embedded;It is thus achieved that web page contents and the technology of the asynchronous load of target content to be embedded are imitated
Fruit, and by the asynchronous load, it is also easy to that target content to be embedded is controlled and managed.
The above description is only an overview of the technical scheme of the present invention, in order to better understand technological means of the invention, and
It can be implemented in accordance with the contents of the specification, and to allow above and other objects, features and advantages of the invention can be brighter
Show understandable, it is special below to lift preferred embodiment, and cooperate attached drawing, detailed description are as follows.
Detailed description of the invention
Fig. 1 is the flow diagram according to the asynchronous loading method of web page contents of one embodiment of the invention;
Fig. 2 is the structural schematic diagram according to the asynchronous loading device of web page contents of one embodiment of the invention;
Fig. 3 is the structural schematic diagram according to the asynchronous load hardware device of web page contents of one embodiment of the invention;
Fig. 4 is the structural schematic diagram according to the computer readable storage medium of one embodiment of the invention;
Fig. 5 is the structural schematic diagram according to the asynchronous load terminal of web page contents of one embodiment of the invention;
Fig. 6 is the structural schematic diagram according to the asynchronous load terminal of web page contents of another embodiment of the present invention.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Other advantages and efficacy of the present invention can be easily understood for disclosed content.Obviously, described embodiment is only the present invention
A part of the embodiment, instead of all the embodiments.The present invention can also be subject to reality by way of a different and different embodiment
It applies or applies, the various details in this specification can also be based on different viewpoints and application, without departing from spirit of the invention
Lower carry out various modifications or alterations.It should be noted that in the absence of conflict, the feature in following embodiment and embodiment can
To be combined with each other.Based on the embodiments of the present invention, those of ordinary skill in the art are without creative efforts
Every other embodiment obtained, shall fall within the protection scope of the present invention.
It should be noted that the various aspects of embodiment within the scope of the appended claims are described below.Ying Xian
And be clear to, aspect described herein can be embodied in extensive diversified forms, and any specific structure described herein
And/or function is only illustrative.Based on the present invention, it will be understood by one of ordinary skill in the art that one described herein
Aspect can be independently implemented with any other aspect, and can combine the two or both in these aspects or more in various ways.
For example, carry out facilities and equipments in terms of any number set forth herein can be used and/or practice method.In addition, can make
With other than one or more of aspect set forth herein other structures and/or it is functional implement this equipment and/or
Practice the method.
It should also be noted that, illustrating the basic structure that only the invention is illustrated in a schematic way provided in following embodiment
Think, only shown in schema with it is of the invention in related component rather than component count, shape and size when according to actual implementation draw
System, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel can also
It can be increasingly complex.
In addition, in the following description, specific details are provided for a thorough understanding of the examples.However, fields
The skilled person will understand that the aspect can be practiced without these specific details.
With the continuous development of Internet technology, more and more advertisers by the business page come carrying advertisement,
To be shown, thus Internet advertising is come into being.Make the websites such as Taobao, Jingdone district, Suning easily purchase, Netease, Amazon
For advertiser, advertisement page and business page simultaneous display are usually required that.But if in order to meet gray simultaneous display
It is required that and advertisement and service synchronization are loaded, then the advertisement that will lead to business platform again can not provide advertiser carry out control and
Management.
For example, Taobao, Jingdone district, Suning easily purchase, Netease, the websites such as Amazon as advertiser, for synchronization
Carrying advertisement is usually required that before business page downloading with ensuring advertisement page and business page simultaneous display by advertisement page
The insertion business page.In this regard, business platform is needed ad code load synchronous with service code.Wherein, ad code is usual
For a JavaScript file;The JavaScript file can specified position export inline frame (such as:
Inframe frame);The JavaScript file includes document.write API;The ad code is held better than service code
Row.
Although above-mentioned inframe frame etc. is loaded in parallel;But browser is with the load of single thread executive mode
JavaScript file, to will cause load delay, and then the display time of the deferred traffic page.In addition, if should
Occurs exception when JavaScript file loads, then the exception will cause the obstruction of JavaScript file execution, when serious
Also will cause the entire business page can not show.
Simultaneously as advertiser is in ad code by being implanted into the API such as document.write, and require advertisement generation
Code is directly output in html file or template file;So for business platform, if the business page is first loaded, then
The carrying advertisement page can then empty the business page loaded.For this purpose, for the promotional literature that advertiser provides, it is existing
Technology cannot achieve asynchronous load.
Therefore, the prior art haves the defects that cannot achieve the asynchronous load of web page contents.
In consideration of it, the technical issues of in order to solve how to realize web page contents asynchronous load, the embodiment of the present invention provides one
The kind asynchronous loading method of web page contents.As shown in Figure 1, the asynchronous loading method of the web page contents mainly includes the following steps S100 extremely
Step S140.Wherein:
S100:Load web page contents.
Wherein, which for example can be the business tine of the network platform.The business tine can be that both pictures and texts are excellent
Displaying content, video display content, audio and the displaying content of picture etc., in this regard, the present invention is not construed as limiting.
In practical applications, the web page contents can be loaded by browser.
S110:Judge webpage whether loaded.
In an alternative embodiment, step S110 can specifically include:
S111:The load progress of real-time monitoring webpage;
S112:According to real-time monitoring as a result, judge webpage whether loaded.
The present embodiment can carry out real-time monitoring by the console of browser come the load progress to webpage.Then, root
According to the load progress of the webpage real-time monitored, come judge the webpage whether loaded.
S120:If the determination result is YES, then the corresponding target position of target content to be embedded in webpage is obtained.
Wherein, target content to be embedded includes but is not limited to the ad content of third-party platform, promotional content etc..
Specifically, this step may include:
S121:In the corresponding service code of webpage, target placeholder is obtained;
S122:According to target placeholder, target placeholder corresponding position in webpage is obtained, and target placeholder is existed
Corresponding position in webpage, as the corresponding target position of the content to be embedded of target in webpage.
Wherein, which can be character string.For example, null character or other for identifying target content to be embedded
Position character etc..
The target placeholder can by document into regions label (such as:Div tag) it is identified and is obtained.This article
Shelves partition label can by script tag (such as:Script label) it determines.
S130:Obtain target embedded code corresponding with target content to be embedded.
Specifically, this step includes:
According to the corresponding relationship of preset embedded code and target placeholder, and according to target placeholder, acquisition and target
The corresponding target embedded code of placeholder, will target embedded code corresponding with target placeholder, as target content to be embedded
Corresponding target embedded code.
S140:Target content to be embedded is loaded into target position by performance objective embedded code.
In an alternative embodiment, this step can specifically include following steps S141 to step S143.Wherein:
S141:Target embedded code is converted, DOM (Document Object Model, document object mould are obtained
Type) document;Wherein, target embedded code includes document flow write operation interface.
In this step, can use resolver (for example, DOM Parse resolver) to the corresponding code of first page into
Row conversion, to obtain DOM document.
S142:Target embedded code is inserted into target position by document flow write operation interface.
As an example, document flow write operation interface can use document.write API (Application Programming Interface).
S143:Based on DOM document, target embedded code is replaced using target content to be embedded;Wherein, DOM document includes
Page elements, page elements include replacement attribute.
Wherein, the replacement attribute of the page elements can be for example a kind of innerHTML attribute (member in JavaScript
The attribute of element).
Specifically, this step can be by being configured to realize to attribute of an element in target content to be embedded.Example
Such as, can by innerHTML attribute, so that target content to be embedded can replace the target embedded code, thus
Realize the asynchronous load to target content to be embedded.
Technical solution provided in this embodiment can be executed by browser.In the asynchronous load target of browser is to be embedded
Rong Hou, by the rendering of browser, finally, web page contents and target content to be embedded can synchronously be shown in the screen of terminal
On curtain.For example, real through the invention by taking web page contents are business webpage, target content to be embedded is ad content as an example
The asynchronous loading method of web page contents for applying example offer, can first run business webpage, after the business webpage normal operation, then it is different
Walk carrying advertisement;Hereby it is achieved that the technical effect of business webpage and the asynchronous load of advertisement.
Wherein, the above-mentioned terminal include but is not limited to smart phone, tablet computer, desktop computer, laptop computer,
Intelligent TV set, wearable device, virtual reality device etc..
In conclusion the embodiment of the present invention by taking above-mentioned each technical solution, is both different from the networks such as Yahoo
Document flow write operation API is used in the limitation page that platform is taken, and is implanted directly into load side also different from existing, code
Formula, but after having loaded webpage, target embedded code corresponding with target content to be embedded is executed, target is to be embedded interior
Appearance is loaded into the corresponding target position of the content to be embedded of target in webpage;It is thus achieved that web page contents and target content to be embedded
The technical effect of asynchronous load.The embodiment of the present invention is also easy to control target content to be embedded by the asynchronous load
System and management.
Hereinbefore, although describing each step in the asynchronous loading method embodiment of web page contents according to above-mentioned sequence
It suddenly, can also be with it will be apparent to one skilled in the art that the step in the embodiment of the present invention not necessarily executes in the order described above
Other sequences such as inverted order, parallel, intersection execute, moreover, those skilled in the art can also add again on the basis of above-mentioned steps
Enter other steps, the mode of these obvious variants or equivalent replacement should also be included within protection scope of the present invention, herein not
It repeats again.
The following is an embodiment of the apparatus of the present invention, and apparatus of the present invention embodiment is used to execute embodiment of the present invention method realization
Step, for ease of description, only parts related to embodiments of the present invention are shown, disclosed by specific technical details, please join
According to embodiment of the present invention method.
It the technical issues of in order to solve how to realize web page contents asynchronous load, is based on and the asynchronous load of above-mentioned web page contents
The identical technical concept of embodiment of the method, the embodiment of the present invention also provide a kind of asynchronous loading device of web page contents.Such as Fig. 2 institute
Show, the device mainly includes:First loading module 21, judgment module 22, first obtain module 23, second and obtain module 24 and the
Two loading modules 25.Wherein, the first loading module 21 is for loading web page contents.Judgment module 22 is for judging whether webpage adds
Load finishes.First obtains module 23 corresponds in the case where the judgment result is yes, obtaining target content to be embedded in webpage
Target position.Second obtains module 24 for obtaining target embedded code corresponding with target content to be embedded.Second load
Module 25 is used for performance objective embedded code, and target content to be embedded is loaded into target position.
In an alternative embodiment, above-mentioned judgment module 22 is specifically used for:The load progress of real-time monitoring webpage;Root
Monitoring result when factually, judge webpage whether loaded.
In an alternative embodiment, above-mentioned first acquisition module 23 is specifically used for:In the corresponding service code of webpage
In, obtain target placeholder;According to target placeholder, target placeholder corresponding position in webpage is obtained, and target is accounted for
Position symbol corresponding position in webpage, as the corresponding target position of the content to be embedded of target in webpage.
In an alternative embodiment, above-mentioned second acquisition module 24 is specifically used for:According to preset embedded code with
The corresponding relationship of target placeholder, and according to target placeholder, obtains target embedded code corresponding with target placeholder, will be with
The corresponding target embedded code of target placeholder, as the corresponding target embedded code of target content to be embedded.
In an alternative embodiment, above-mentioned second loading module 25 is specifically used for:Target embedded code is turned
It changes, obtains DOM DOM Document Object Model document;Wherein, target embedded code includes document flow write operation interface;It is write by document flow
Target embedded code is inserted into target position by operation interface;Based on DOM document, it is embedded in using target content replacement target to be embedded
Code;Wherein, DOM document includes page elements, and page elements include replacement attribute.
In an alternative embodiment, above-mentioned target content to be embedded is advertisement.
In conclusion the embodiment of the present invention by taking above-mentioned each technical solution, is both different from the networks such as Yahoo
Document flow write operation API is used in the limitation page that platform is taken, and is implanted directly into load side also different from existing, code
Formula, but utilize the first loading module 21 load web page contents, and by judgment module 22 judge webpage whether loaded;?
After having loaded webpage, executed by the second loading module 25 it is corresponding with target content to be embedded, by second obtain mould
Target content to be embedded, is loaded into that the content to be embedded of target in webpage is corresponding, passes through by the target embedded code that block 24 obtains
First obtains the target position that module 23 obtains;It is thus achieved that the technology of web page contents and the asynchronous load of target content to be embedded
Effect.The embodiment of the present invention by the asynchronous load is also easy to that target content to be embedded is controlled and managed.
Fig. 3 is the hardware block diagram of the asynchronous load hardware device of diagram web page contents according to an embodiment of the present disclosure.Such as Fig. 3
It is shown, it include memory 31 and processor 32 according to the asynchronous load hardware device 30 of the web page contents of the embodiment of the present disclosure.
The memory 31 is for storing non-transitory computer-readable instruction.Specifically, memory 31 may include one
Or multiple computer program products, the computer program product may include various forms of computer readable storage mediums, example
Such as volatile memory and/or nonvolatile memory.The volatile memory for example may include random access memory
(RAM) and/or cache memory (cache) etc..The nonvolatile memory for example may include read-only memory
(ROM), hard disk, flash memory etc..
The processor 32 can be central processing unit (CPU) or have data-handling capacity and/or instruction execution energy
The processing unit of the other forms of power, and can control other components in the asynchronous load hardware device 30 of web page contents to hold
The desired function of row.In one embodiment of the present disclosure, the processor 32 is by running based on this stored in the memory 31
Calculation machine readable instruction, so that the asynchronous load hardware device 30 of the web page contents executes in the webpage of each embodiment of the disclosure above-mentioned
Hold all or part of the steps of asynchronous loading method.
Those skilled in the art will be understood that solve the technical issues of how obtaining good user experience effect, this
It also may include structure well known to communication bus, interface etc. in embodiment, these well known structures should also be included in this hair
Within bright protection scope.
Being described in detail in relation to the present embodiment can be with reference to the respective description in foregoing embodiments, and details are not described herein.
The present embodiment is loading net when processor 32 executes the non-transitory computer-readable instruction on memory 31
After page, target embedded code corresponding with target content to be embedded is executed, target content to be embedded is loaded into mesh in webpage
Mark the corresponding target position of content to be embedded;It is thus achieved that web page contents and the technology of the asynchronous load of target content to be embedded are imitated
Fruit, and by the asynchronous load, it is also easy to that target content to be embedded is controlled and managed.
Fig. 4 is the schematic diagram for illustrating computer readable storage medium according to an embodiment of the present disclosure.As shown in figure 4, root
According to the computer readable storage medium 40 of the embodiment of the present disclosure, it is stored thereon with non-transitory computer-readable instruction 41.When this
When non-transitory computer-readable instruction 41 is run by processor, the web page contents for executing each embodiment of the disclosure above-mentioned are asynchronous
The all or part of the steps of loading method.
Above-mentioned computer readable storage medium 40 includes but is not limited to:Optical storage media (such as:CD-ROM and DVD), magnetic
Optical storage media (such as:MO), magnetic storage medium (such as:Tape or mobile hard disk), with built-in rewritable nonvolatile
Memory media (such as:Storage card) and with built-in ROM media (such as:ROM box).
Being described in detail in relation to the present embodiment can be with reference to the respective description in foregoing embodiments, and details are not described herein.
Computer readable storage medium 40 provided in this embodiment is in non-transitory computer-readable instruction 41 by processor
When operation, after having loaded webpage, target embedded code corresponding with target content to be embedded is executed, target is to be embedded interior
Appearance is loaded into the corresponding target position of the content to be embedded of target in webpage;It is thus achieved that web page contents and target content to be embedded
The technical effect of asynchronous load, and by the asynchronous load, it is also easy to that target content to be embedded is controlled and managed.
Fig. 5 is the hardware structural diagram for illustrating the terminal according to the embodiment of the present disclosure.As shown in figure 5, the web page contents
Asynchronous load terminal 50 includes the asynchronous loading device 51 of above-mentioned web page contents.
The terminal can be implemented in a variety of manners, and the terminal in the disclosure can include but is not limited to such as move electricity
Words, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP are (just
Take formula multimedia player), the movement of navigation device, vehicle-mounted terminal equipment, vehicle-mounted display terminal, vehicle electronics rearview mirror etc.
The fixed terminal equipment of terminal device and such as number TV, desktop computer etc..
As the embodiment of equivalent replacement, which can also include other assemblies.As shown in fig. 6, the web page contents
Asynchronous load terminal 60 may include power supply unit 61, wireless communication unit 62, A/V (audio/video) input unit 63, use
Family input unit 64, sensing unit 65, interface unit 66, controller 67, output unit 68 and memory 69 etc..Fig. 6 is shown
Terminal with various assemblies, it should be understood that be not required for implementing all components shown, it can also be alternatively real
Apply more or fewer components.
Wherein, wireless communication unit 62 allows the radio communication between terminal 60 and wireless communication system or network.A/V
Input unit 63 is for receiving audio or video signal.It is defeated that the order that user input unit 64 can be inputted according to user generates key
Enter data with the various operations of controlling terminal equipment.Sensing unit 65 detects the current state of terminal 60, the position of terminal 60, use
Family is mobile for the acceleration or deceleration of the orientation of the presence or absence of touch input of terminal 60, terminal 60, terminal 60 and direction etc., and
And generate order or the signal for the operation for being used for controlling terminal 60.Interface unit 66 is used as at least one external device (ED) and terminal 60
Connection can by interface.Output unit 68 is configured to provide output signal with vision, audio and/or tactile manner.It deposits
Reservoir 69 can store the software program etc. of the processing and control operation that are executed by controller 67, or can temporarily store
Oneself is through output or the data that will be exported.Memory 69 may include the storage medium of at least one type.Moreover, terminal 60
It can cooperate with the network storage device for the store function for executing memory 69 by network connection.The usually control of controller 67 is eventually
The overall operation of end equipment.In addition, controller 67 may include for reproducing or the multi-media module of multimedia playback data.Control
The handwriting input executed on the touchscreen or picture can be drawn input and are identified as by device 67 processed with execution pattern identifying processing
Character or image.Power supply unit 61 receives external power or internal power under the control of controller 67 and provides operation each member
Electric power appropriate needed for part and component.
The various embodiments for the asynchronous loading method of web page contents that the disclosure proposes can be to use such as computer soft
The computer-readable medium of part, hardware or any combination thereof is implemented.Hardware is implemented, the web page contents that the disclosure proposes are different
The various embodiments for walking loading method can be by using application-specific IC (ASIC), digital signal processor
(DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processing
Device, microcontroller, microprocessor, is designed to execute at least one of electronic unit of function described herein controller
Implement, in some cases, the various embodiments for the asynchronous loading method of web page contents that the disclosure proposes can control
Implement in device 67.For software implementation, the various embodiments for the asynchronous loading method of web page contents that the disclosure proposes can be with
Allow to execute the individual software module of at least one functions or operations to implement.Software code can be by with any volume appropriate
Software application (or program) that Cheng Yuyan writes is implemented, and software code can store in memory 69 and by controlling
Device 67 executes.
Being described in detail in relation to the present embodiment can be with reference to the respective description in foregoing embodiments, and details are not described herein.
The asynchronous load terminal of web page contents provided in this embodiment executes to be embedded interior with target after having loaded webpage
Hold corresponding target embedded code, target content to be embedded is loaded into the corresponding target position of the content to be embedded of target in webpage
It sets;It is thus achieved that the technical effect of web page contents and the asynchronous load of target content to be embedded, and by the asynchronous load, also
It is easy to that target content to be embedded is controlled and managed.
The basic principle of the disclosure is described in conjunction with specific embodiments above, however, it is desirable to, it is noted that in the disclosure
The advantages of referring to, advantage, effect etc. are only exemplary rather than limitation, must not believe that these advantages, advantage, effect etc. are the disclosure
Each embodiment is prerequisite.In addition, detail disclosed above is merely to exemplary effect and the work being easy to understand
With, rather than limit, it is that must be realized using above-mentioned concrete details that above-mentioned details, which is not intended to limit the disclosure,.
Device involved in the disclosure, device, equipment, system block diagram only as illustrative example and be not intended to
It is required that or hint must be attached in such a way that box illustrates, arrange, configure.As those skilled in the art will appreciate that
, it can be connected by any way, arrange, configure these devices, device, equipment, system.Such as "include", "comprise", " tool
" etc. word be open vocabulary, refer to " including but not limited to ", and can be used interchangeably with it.Vocabulary used herein above
"or" and "and" refer to vocabulary "and/or", and can be used interchangeably with it, unless it is not such that context, which is explicitly indicated,.Here made
Vocabulary " such as " refers to phrase " such as, but not limited to ", and can be used interchangeably with it.
In addition, as used herein, the "or" instruction separation used in the enumerating of the item started with "at least one"
It enumerates, so that enumerating for such as " at least one of A, B or C " means A or B or C or AB or AC or BC or ABC (i.e. A and B
And C).In addition, wording " exemplary " does not mean that the example of description is preferred or more preferable than other examples.
It may also be noted that in the system and method for the disclosure, each component or each step are can to decompose and/or again
Combination nova.These decompose and/or reconfigure the equivalent scheme that should be regarded as the disclosure.
The technology instructed defined by the appended claims can not departed from and carried out to the various of technology described herein
Change, replace and changes.In addition, the scope of the claims of the disclosure is not limited to process described above, machine, manufacture, thing
Composition, means, method and the specific aspect of movement of part.Can use carried out to corresponding aspect described herein it is essentially identical
Function or realize essentially identical result there is currently or later to be developed processing, machine, manufacture, event group
At, means, method or movement.Thus, appended claims include such processing, machine, manufacture, event within its scope
Composition, means, method or movement.
The above description of disclosed aspect is provided so that any person skilled in the art can make or use this
It is open.Various modifications in terms of these are readily apparent to those skilled in the art, and are defined herein
General Principle can be applied to other aspect without departing from the scope of the present disclosure.Therefore, the disclosure is not intended to be limited to
Aspect shown in this, but according to principle disclosed herein and the consistent widest range of novel feature.
In order to which purpose of illustration and description has been presented for above description.In addition, this description is not intended to the reality of the disclosure
It applies example and is restricted to form disclosed herein.Although already discussed above multiple exemplary aspects and embodiment, this field skill
Its certain modifications, modification, change, addition and sub-portfolio will be recognized in art personnel.
Claims (15)
1. a kind of asynchronous loading method of web page contents, which is characterized in that the method includes:
Load the web page contents;
Judge webpage whether loaded;
If the determination result is YES, then the corresponding target position of target content to be embedded in the webpage is obtained;
Obtain target embedded code corresponding with target content to be embedded;
The target embedded code is executed, target content to be embedded is loaded into the target position.
2. the method according to claim 1, wherein it is described judge webpage whether loaded the step of, specifically
Including:
The load progress of webpage described in real-time monitoring;
According to real-time monitoring as a result, judge the webpage whether loaded.
3. the method according to claim 1, wherein target content to be embedded is corresponding in the acquisition webpage
Target position the step of, specifically include:
In the corresponding service code of the webpage, target placeholder is obtained;
According to the target placeholder, the target placeholder corresponding position in the webpage is obtained, and by the target
Placeholder corresponding position in the webpage, as the corresponding target position of the content to be embedded of target described in the webpage
It sets.
4. according to the method described in claim 3, it is characterized in that, described obtain mesh corresponding with target content to be embedded
The step of marking embedded code, specifically includes:
According to the corresponding relationship of preset embedded code and the target placeholder, and according to the target placeholder, obtain with
The corresponding target embedded code of the target placeholder, will the target embedded code corresponding with the target placeholder, work
For the corresponding target embedded code of target content to be embedded.
5. the method according to claim 1, wherein described execute the target embedded code, by the target
The step of content to be embedded is loaded into the target position, specifically includes:
The target embedded code is converted, DOM Document Object Model DOM document is obtained;Wherein, the target embedded code
Including document flow write operation interface;
The target embedded code is inserted into the target position by the document flow write operation interface;
Based on the DOM document, the target embedded code is replaced using target content to be embedded;Wherein, the DOM text
Shelves include page elements, and the page elements include replacement attribute.
6. the method according to claim 1, wherein target content to be embedded is advertisement.
7. a kind of asynchronous loading device of web page contents, which is characterized in that described device includes:
First loading module, for loading the web page contents;
Judgment module, for judge webpage whether loaded;
First obtains module, corresponding in the case where the judgment result is yes, obtaining the content to be embedded of target in the webpage
Target position;
Second obtains module, for obtaining target embedded code corresponding with target content to be embedded;
Target content to be embedded is loaded into the target for executing the target embedded code by the second loading module
Position.
8. device according to claim 7, which is characterized in that the judgment module is specifically used for:
The load progress of webpage described in real-time monitoring;
According to real-time monitoring as a result, judge the webpage whether loaded.
9. device according to claim 7, which is characterized in that the first acquisition module is specifically used for:
In the corresponding service code of the webpage, target placeholder is obtained;
According to the target placeholder, the target placeholder corresponding position in the webpage is obtained, and by the target
Placeholder corresponding position in the webpage, as the corresponding target position of the content to be embedded of target described in the webpage
It sets.
10. device according to claim 9, which is characterized in that the second acquisition module is specifically used for:
According to the corresponding relationship of preset embedded code and the target placeholder, and according to the target placeholder, obtain with
The corresponding target embedded code of the target placeholder, will the target embedded code corresponding with the target placeholder, work
For the corresponding target embedded code of target content to be embedded.
11. device according to claim 7, which is characterized in that second loading module is specifically used for:
The target embedded code is converted, DOM DOM Document Object Model document is obtained;Wherein, the target embedded code
Including document flow write operation interface;
The target embedded code is inserted into the target position by the document flow write operation interface;
Based on the DOM document, the target embedded code is replaced using target content to be embedded;Wherein, the DOM text
Shelves include page elements, and the page elements include replacement attribute.
12. device according to claim 7, which is characterized in that the target content to be embedded is advertisement.
13. a kind of asynchronous load hardware device of web page contents, including:
Memory, for storing non-transitory computer-readable instruction;And
Processor, for running the computer-readable instruction, so that being realized when the processor executes as in claim 1-6
The asynchronous loading method of web page contents described in any one.
14. a kind of computer readable storage medium, for storing non-transitory computer-readable instruction, when the non-transitory meter
When calculation machine readable instruction is executed by computer, so that the computer executes the net as described in any one of claim 1-6
The page asynchronous loading method of content.
15. a kind of asynchronous load terminal of web page contents, including a kind of asynchronous load dress of web page contents described in claim 6-12
It sets.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810403879.2A CN108874875A (en) | 2018-04-28 | 2018-04-28 | The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810403879.2A CN108874875A (en) | 2018-04-28 | 2018-04-28 | The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108874875A true CN108874875A (en) | 2018-11-23 |
Family
ID=64327077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810403879.2A Pending CN108874875A (en) | 2018-04-28 | 2018-04-28 | The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108874875A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110889071A (en) * | 2019-11-20 | 2020-03-17 | 山东中创软件工程股份有限公司 | Text generation method, device and equipment and computer readable storage medium |
CN112364277A (en) * | 2020-11-23 | 2021-02-12 | 北京三快在线科技有限公司 | Webpage loading method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070226057A1 (en) * | 2006-03-27 | 2007-09-27 | Genesys Telecommunications Laboratories, Inc. | System for Managing Dynamic Placement of Advertisements in Electronic Information Pages |
CN102510377A (en) * | 2011-10-31 | 2012-06-20 | 北京锐安科技有限公司 | Webpage interaction accelerating asynchronous data processing method and system |
CN103268207A (en) * | 2012-01-04 | 2013-08-28 | 国际商业机器公司 | Web video occlusion: a method for rendering the videos watched over multiple windows |
CN103412890A (en) * | 2013-07-19 | 2013-11-27 | 北京亿赞普网络技术有限公司 | Webpage loading method and device |
CN105094786A (en) * | 2014-05-21 | 2015-11-25 | 广州市动景计算机科技有限公司 | Method and system for customizing page based on JavaScript |
-
2018
- 2018-04-28 CN CN201810403879.2A patent/CN108874875A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070226057A1 (en) * | 2006-03-27 | 2007-09-27 | Genesys Telecommunications Laboratories, Inc. | System for Managing Dynamic Placement of Advertisements in Electronic Information Pages |
CN102510377A (en) * | 2011-10-31 | 2012-06-20 | 北京锐安科技有限公司 | Webpage interaction accelerating asynchronous data processing method and system |
CN103268207A (en) * | 2012-01-04 | 2013-08-28 | 国际商业机器公司 | Web video occlusion: a method for rendering the videos watched over multiple windows |
CN103412890A (en) * | 2013-07-19 | 2013-11-27 | 北京亿赞普网络技术有限公司 | Webpage loading method and device |
CN105094786A (en) * | 2014-05-21 | 2015-11-25 | 广州市动景计算机科技有限公司 | Method and system for customizing page based on JavaScript |
Non-Patent Citations (1)
Title |
---|
YOURBER: "Javascript 实现广告后加载 可加载百度谷歌联盟广告", 《HTTPS://WWW.JB51.NET/ARTICLE/83944.HTM》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110889071A (en) * | 2019-11-20 | 2020-03-17 | 山东中创软件工程股份有限公司 | Text generation method, device and equipment and computer readable storage medium |
CN112364277A (en) * | 2020-11-23 | 2021-02-12 | 北京三快在线科技有限公司 | Webpage loading method and device |
CN112364277B (en) * | 2020-11-23 | 2024-03-08 | 北京三快在线科技有限公司 | Webpage loading method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107957831B (en) | Data processing method, device and processing equipment for displaying interface content | |
CN105279251B (en) | Virtual gift display method and device | |
CN108280119A (en) | Page generation method, device and user terminal | |
CN103761110B (en) | browser font display processing method and device | |
US20150220496A1 (en) | Dynamic sprite based theme switching | |
CN103309563A (en) | Displayed page switching method and device | |
CN106648343A (en) | Rolling page turning display method and apparatus for electronic book reading | |
CN103744932A (en) | Page processing method and device | |
CN109062653B (en) | Long image-text information display method, computer device and computer readable storage medium | |
CN105117491A (en) | Page pushing method and device | |
CN112486611B (en) | Page switching display method and device, storage medium and electronic equipment | |
CN108696767A (en) | Barrage playback method, device, computer readable storage medium and terminal | |
CN109408162A (en) | A kind of method and terminal showing the page | |
CN104346463A (en) | Loading method and device of page label and browser client | |
CN105657563A (en) | Commodity recommending system and method based on video contents | |
CN104133865A (en) | Advertisement filtering method and device | |
CN104254849A (en) | User terminal apparatus supporting fast web scroll of web documents and method therefor | |
CN108874875A (en) | The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal | |
US10091556B1 (en) | Relating items to objects detected in media | |
US9679297B2 (en) | Method and apparatus for isolating analytics logic from content creation in a rich internet application | |
CN110780939B (en) | Method, device, computer equipment and storage medium for loading resource file | |
CN107967344A (en) | Implementation method, system, equipment and the storage medium of web animation effect | |
CN106708478B (en) | Scroll view display method and apparatus | |
US20150199329A1 (en) | Text display method and apparatus of electronic device | |
CN105630893A (en) | Display method and device of photo title |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |