Movatterモバイル変換


[0]ホーム

URL:


CN104270447A - Synchronous modular loading method for content on html page - Google Patents

Synchronous modular loading method for content on html page
Download PDF

Info

Publication number
CN104270447A
CN104270447ACN201410526835.0ACN201410526835ACN104270447ACN 104270447 ACN104270447 ACN 104270447ACN 201410526835 ACN201410526835 ACN 201410526835ACN 104270447 ACN104270447 ACN 104270447A
Authority
CN
China
Prior art keywords
data
content
html page
interface
render
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
Application number
CN201410526835.0A
Other languages
Chinese (zh)
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.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur General Software Co LtdfiledCriticalInspur General Software Co Ltd
Priority to CN201410526835.0ApriorityCriticalpatent/CN104270447A/en
Publication of CN104270447ApublicationCriticalpatent/CN104270447A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention relates to a synchronous modular loading method of content on an html page, which comprises the following steps: step one, planning a server-side data acquisition interface of each modular content according to the content display requirement; step two, registering a data acquisition interface to a configuration file; step three, marking and describing the modularized content display area on the html page; and step four, providing a component engine at the system server, intercepting the user request when the configured html page is accessed by the user, analyzing the html page code structure of the user request, and filtering out the dom element marked with the data _ render. The invention realizes the modularized loading of the dynamic content and solves the problem that the dynamic content under the html page is not friendly to SEO.

Description

The synchronization module loading method of content on a kind of html page
Technical field
The present invention relates to web development technique art field, be specifically related to the synchronization module loading method of content on a kind of html page.
Background technology
On the html page, the realization of modularization dynamic load content is all generally the mode adopting ajax, and the content of this mode loads and can be decomposed into two steps, and the first step is when user opens the page, the basic html of leading load page and script, do not comprise main data content; Second step is after the basic html of the page has loaded, and is sent request to server end by the script on the page, and after getting data, then inside the dom element that loads to the first step of Dynamic Announce, this mode is commonly referred to as " ajax ".In this manner, the data that second step request returns are visible to human eye on the page, but are but sightless asking in the page source code obtained.But, when search engine carries out index to the page according to the page source code of asking exactly to obtain, so the mode of ajax will cause cannot to the content compilation index needing index, on the html page, dynamic content cannot index, is disagreeableness to SEO.
Therefore for the defect that above-mentioned prior art exists, be in fact necessary to develop research, to provide a kind of scheme, by introducing dynamically to the method for additional content in request, solving dynamic content on the html page cannot the problem of index.
Summary of the invention
For solving the problem, the object of the present invention is to provide the synchronization module loading method of content on a kind of html page, cannot the problem of index to solve dynamic content on the html page.
For achieving the above object, technical scheme of the present invention is:
On the html page, a synchronization module loading method for content, comprises the steps:
Step one, the needs shown according to content, plan that the servers' data of each modularization content obtains interface;
Step 2, log-on data obtain interface to configuration file;
Step 3, the mark of carrying out html page patrix blocking content display region and description;
Step 4, provide a component engine in system server terminal, when the html page after having configured is accessed by the user, component engine can be tackled user's request, and analyzes the html page code structure of its request, therefrom filters out the dom element of mark data_render.
Further, in step one, carry out data-interface description, the citation form of provisioning modules content area data-interface and structure.
Further, in step 3, operationally dynamically obtain data the dynamic content region of displaying contents from server end to all on the html page and identify, identification means is that interpolation mark data_render is also its assignment on the dom element in this region, and its value is the name that servers' data obtains interface.
Further, in step 4, when client initiates request, server end is tackled request, and analyzes the html page of asking, data_render is used to filter page dom element, for the dom element be filled into, by the value of its data_render, at the example of its desired data interface of server end dynamic reflective, and obtain desired data by calling GetData method, be then attached in this dom element.
Compared to prior art, on the html page of the present invention, the synchronization module loading method of content can in the page of html type, and the modularization realizing dynamic content loads, and under solving the html page, dynamic content is to the disagreeableness problem of SEO.Same server-side data structure, by importing different parameters into, can load different data, shape paired data interface multiplexing.
Term " first ", " second " etc. in specification of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the term used like this can exchange in the appropriate case, this is only describe in embodiments of the invention the differentiation mode that the object of same alike result adopts when describing.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, to comprise the process of a series of unit, method, system, product or equipment being not necessarily limited to those unit, but can comprise clearly do not list or for intrinsic other unit of these processes, method, product or equipment.
Below be described in detail respectively.
Please refer to shown in Fig. 1, Fig. 2, on the html page of the present invention, the synchronization module loading method of content, comprises the steps:
Step one, the needs shown according to content, plan that the servers' data of each modularization content obtains interface;
Carry out data-interface description, the citation form of provisioning modules content area data-interface and structure, on the corresponding page, the data-interface of modules content area realizes this interface.Data-interface defines requirement according to unified interface, mainly realizes GetData method.In the embodiment of the present invention, unified interface is defined as follows:
public?interface?IPortlet
{?public?string?GetData(object?param)
}
Step 2, log-on data obtain interface to configuration file
Title, procedure set reflection entrance is called by the mode registration interface of shape as <add name=" SinaRssNews " value=" GenerSoft.EPP.RSS.RSSReader, GenerSoft.EPP.RSS "/> in server end configuration file.The data-interface achieving IPortlet interface will describe in document at interface to be registered, and mainly indicates its name, value and params during registration, and wherein name is the unique invocation flags of its overall situation; Value is its program for .NET reflection and title.
Step 3, the mark of carrying out html page patrix blocking content display region and description
Operationally dynamically obtain data the dynamic content region of displaying contents from server end to all on the html page and identify, identification means is that interpolation mark data_render is also its assignment on the dom element in this region, and its value is the name that servers' data obtains interface; Params is its desired parameters, json character string type, the dom element after having configured, shape as:
<div?id="sina_news"?data_render="SinaRssNews"?params?=?"?{url:'http://',itemsCount:8}"?></div>
Step 4, provide a component engine in system server terminal, when the html page after having configured is accessed by the user, component engine can be tackled user's request, and analyzes the html page code structure of its request, therefrom filters out the dom element of mark data_render.
Particularly, when client initiates request, server end is tackled request, and analyze the html page of asking, use data_render to filter page dom element, for the dom element be filled into, by the value of its data_render, at the example of its desired data interface of server end dynamic reflective, and obtaining desired data by calling GetData method, being then attached in this dom element.Code is as follows:
public?class?PortletHandler?:?IHttpHandler
{
public?bool?IsReusable
{
Filter out all be marked with the dom element of data_render after, according to the value of data_render, get corresponding data-interface assembly name, and utilize this procedure set of reflex mechanism instantiation of .NET, and call its GetData method acquisition data, be filled into corresponding dynamic content region.After the data acquisition in all the elements region, component engine process after html content Response to client user's browser.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required common hardware by software and realize, and can certainly comprise application-specific integrated circuit (ASIC), dedicated cpu, private memory, special components and parts etc. realize by specialized hardware.Generally, all functions completed by computer program can realize with corresponding hardware easily, and the particular hardware structure being used for realizing same function also can be diversified, such as analog circuit, digital circuit or special circuit etc.But under more susceptible for the purpose of the present invention condition, software program realizes is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in the storage medium that can read, as the floppy disk of computer, USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform method described in the present invention each embodiment.
In sum, above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to above-described embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in the various embodiments described above, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.
Accompanying drawing explanation
Fig. 1 is method flow of the present invention diagram.
Fig. 2 is framework of the present invention diagram.
Embodiment
The synchronization module loading method embodiments providing content on a kind of html page can in the page of html type, and the modularization realizing dynamic content loads, and under solving the html page, dynamic content is to the disagreeableness problem of SEO.Same server-side data structure, by importing different parameters into, can load different data, shape paired data interface multiplexing.
For making goal of the invention of the present invention, feature, advantage can be more obvious and understandable, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, the embodiments described below are only the present invention's part embodiments, and not all embodiments.Based on the embodiment in the present invention, the every other embodiment that those skilled in the art obtains, all belongs to the scope of protection of the invention.

Claims (4)

CN201410526835.0A2014-10-092014-10-09Synchronous modular loading method for content on html pagePendingCN104270447A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201410526835.0ACN104270447A (en)2014-10-092014-10-09Synchronous modular loading method for content on html page

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410526835.0ACN104270447A (en)2014-10-092014-10-09Synchronous modular loading method for content on html page

Publications (1)

Publication NumberPublication Date
CN104270447Atrue CN104270447A (en)2015-01-07

Family

ID=52161936

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410526835.0APendingCN104270447A (en)2014-10-092014-10-09Synchronous modular loading method for content on html page

Country Status (1)

CountryLink
CN (1)CN104270447A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2019052417A1 (en)*2017-09-152019-03-21广州优视网络科技有限公司Page loading method and apparatus, electronic device and storage medium
CN110968314A (en)*2018-09-302020-04-07北京国双科技有限公司Page generation method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101848231A (en)*2010-03-082010-09-29深圳市同洲电子股份有限公司Method and system for data transmission
CN101996187A (en)*2009-08-202011-03-30上海杉达学院Portable data checking system of mobile website
CN102654887A (en)*2012-05-082012-09-05上海互联网软件有限公司Data capturing system
CN102685257A (en)*2012-06-112012-09-19深圳中兴网信科技有限公司Data synchronous processing system, data synchronous processing method and server system
CN102682093A (en)*2012-04-252012-09-19广州市动景计算机科技有限公司Web page sectionally-loading method and web page sectionally-loading system for mobile browser
CN103020246A (en)*2012-12-182013-04-03北京奇虎科技有限公司Webpage data presentation method and device for browser
CN103927384A (en)*2014-04-302014-07-16国家电网公司Multi-hierarchy data synchronism method and system between heterogeneous systems through HTML script analysis

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101996187A (en)*2009-08-202011-03-30上海杉达学院Portable data checking system of mobile website
CN101848231A (en)*2010-03-082010-09-29深圳市同洲电子股份有限公司Method and system for data transmission
CN102682093A (en)*2012-04-252012-09-19广州市动景计算机科技有限公司Web page sectionally-loading method and web page sectionally-loading system for mobile browser
CN102654887A (en)*2012-05-082012-09-05上海互联网软件有限公司Data capturing system
CN102685257A (en)*2012-06-112012-09-19深圳中兴网信科技有限公司Data synchronous processing system, data synchronous processing method and server system
CN103020246A (en)*2012-12-182013-04-03北京奇虎科技有限公司Webpage data presentation method and device for browser
CN103927384A (en)*2014-04-302014-07-16国家电网公司Multi-hierarchy data synchronism method and system between heterogeneous systems through HTML script analysis

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2019052417A1 (en)*2017-09-152019-03-21广州优视网络科技有限公司Page loading method and apparatus, electronic device and storage medium
CN110968314A (en)*2018-09-302020-04-07北京国双科技有限公司Page generation method and device
CN110968314B (en)*2018-09-302023-05-12北京国双科技有限公司Page generation method and device

Similar Documents

PublicationPublication DateTitle
RU2614572C2 (en)Method, system and device for filtering advertisement web pages on mobile terminal
CN108572825B (en)User interface processing method, device and equipment
CN104025068B (en)The Conflict solving of the CSS definition from multiple sources
CN107562427B (en)Page template engine rendering method based on NodeJS
US9015657B2 (en)Systems and methods for developing and delivering platform adaptive web and native application content
US20120278700A1 (en)Filtered Stylesheets
JP2019530921A (en) Method and system for server-side rendering of native content for presentation
CN106569856B (en)A kind of loading method and device of application view resource file
CN104049991A (en)Method and system for converting network applications into mobile applications
CN105159999A (en)Dynamic page displaying method and dynamic page displaying device
CN106339414A (en)Webpage rendering method and device
US10120660B2 (en)Systems and methods for producing launchers for a mobile terminal
CN108563477B (en)Page event response method and device
CN105677654A (en)Advertisement filtering method and device
CN102999578A (en)Method and device for processing page element
CN105912328B (en)Display methods, device and the web system of the web system page
EP3220285A1 (en)Data acquisition program, data acquisition method and data acquisition device
CN102999579A (en)Browser for processing page textbox, and method for processing page textbox element
CN106815037B (en)Application function execution method and device
CN109933673A (en)A kind of relation map generation method and device
CN104270447A (en)Synchronous modular loading method for content on html page
DE202015009317U1 (en) Embed a guest module in an embedder module
CN115526160A (en)Rich text processing method, device and equipment and storage medium
CN104391792B (en)Test environment information processing method, device and system
CN106598829A (en)Webpage automation test method and apparatus

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
WD01Invention patent application deemed withdrawn after publication
WD01Invention patent application deemed withdrawn after publication

Application publication date:20150107


[8]ページ先頭

©2009-2025 Movatter.jp