CN102609503A - Method and device for generating static webpages - Google Patents
Method and device for generating static webpages Download PDFInfo
- Publication number
- CN102609503A CN102609503A CN2012100236087A CN201210023608A CN102609503A CN 102609503 A CN102609503 A CN 102609503A CN 2012100236087 A CN2012100236087 A CN 2012100236087A CN 201210023608 A CN201210023608 A CN 201210023608A CN 102609503 A CN102609503 A CN 102609503A
- Authority
- CN
- China
- Prior art keywords
- static
- web page
- page
- source code
- static web
- 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
Images
Abstract
The invention discloses a method and a device for generating static webpages. The method for generating static webpages includes steps: reading static source codes of file content of a dynamic webpage of a static webpage to be generated; acquiring a text with the static source codes and converting the text into a static webpage file; and transmitting the static webpage file to an accessed position of an accessed server. Using the method and the device can convert the dynamic webpage into the static webpage without using a static template but by reading the static source codes of the file content of the dynamic webpage of the static webpage to be generated and storing the static source codes into the static webpage file, high efficiency and low development amount are achieved, and the problem of slow accessing caused by the facts that the webpage of a website is a nonstatic webpage and data volume is gradually increased after data accumulation for many years is solved.
Description
Technical field
The present invention relates to Internet technical field, relate in particular to a kind of generation method and device of the static Web page page.
Background technology
In the prior art, the homepage of a lot of websites but is that dynamic page directly shows, a lot of websites also being arranged no matter homepage still is the Webpage of next stage all be the dynamic page demonstration.Here the dynamic demonstration of indication is not meant dynamic flash or the picture on the visual effect, and is meant the real-time calling data demonstration on the page from background data base of foreground, website.But these websites have been moved a lot of years, and huger data volume is arranged.The dynamic page data volume constantly increases response speed and the server expenses that the back influences the page.
By client access the time, access response speed also is an important indicator as an outstanding website, so how let the access response speed of website accelerate?
1. enough big bandwidth outlet will be arranged;
2. server performance is first-class;
3. what the page data of being visited will be tried one's best lacks;
4. the preferably static page of the page.
To above-mentioned 4 points, what can solve through technological means is the 3rd and the 4th point, but as the 3rd point, in some cases, must let the page have so many information that the visitor can be seen, so the possibility that this point is optimized is smaller.So can only optimize from the 4th aspect.
The conventional web sites static page produces for passing through masterplate, and all is the generation that 2,3 grades of pages are done static page a lot, and the homepage of website is the dynamic page demonstration.And as to use the masterplate mode to generate static page, need the development amount of a large amount of masterplates, to some developed accomplish and operation website for many years can produce very big code revision and development.And these websites have been moved a lot of years, and huger data volume is arranged, and use the efficient of masterplate mode also very low.
Summary of the invention
The technical matters that the present invention mainly solves provides a kind of generation method and device of the static Web page page; Thereby solve because the website and webpage page is the non-static Web page page; And through data accumulation for many years, data volume constantly becomes big and causes visiting slack-off several times problem.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: a kind of generation method of the static Web page page is provided, may further comprise the steps:
Read the static source code of file content of the dynamic web page of the static Web page page to be generated;
Obtain text, and said text-converted is become the static Web page file with said static source code;
With said static Web page file be sent to by access server by access location.
Wherein, the step of the static source code of the file content of the said dynamic web page that reads the static Web page page to be generated may further comprise the steps:
Set up be connected by the network of access server with the dynamic web page of the said static Web page page to be generated in being connected of data stream;
Read the static source code of the dynamic web page full page of the said static Web page page to be generated.
Wherein, utilize the URL class to accomplish being connected of network and data stream with data stream class technology.
Be that form with single character reads when wherein, reading said static source code.
Wherein, also comprise step before the step of the static source code of the file content of the said dynamic web page that reads the static Web page page to be generated: judge whether to arrive the generation cycle; If then carry out the static source code of file content that step reads the dynamic web page of the static Web page page to be generated; If not, then continue to judge whether to arrive the generation cycle.
For solving the problems of the technologies described above, another technical scheme that the present invention adopts is: a kind of generating apparatus of the static Web page page is provided, comprises:
Read module is used to read the static source code of file content of the dynamic web page of the static Web page page to be generated;
Modular converter is used to obtain the text with said static source code, and said text-converted is become the static Web page file;
Delivery module, be used for said static Web page file be sent to by access server by access location.
Wherein, said read module comprises:
Linkage unit, be used for setting up be connected by the network of access server with being connected of the dynamic web page data stream of the said static Web page page to be generated;
Acquiring unit is used to read the static source code of the dynamic web page full page of the said static Web page page to be generated.
Wherein, said linkage unit is to utilize the URL class to accomplish being connected of network and data stream with data stream class technology.
Wherein, said acquiring unit is that form with single character reads said static source code.
Wherein, The generating apparatus of the said static Web page page also comprises: judge module; Be used to judge whether to arrive the generation cycle, and trigger the static source code of file content that said read module reads the dynamic web page of the static Web page page to be generated under the situation in generation cycle arriving.
The invention has the beneficial effects as follows: be different from and use the masterplate mode to generate static page in the prior art, need the development amount of a large amount of masterplates, to some have developed completion and operation website for many years, can produce very big code revision and development; And these websites have been moved a lot of years, and huger data volume is arranged, and use the efficient of masterplate mode also very low.The present invention provides a kind of generation method and device of the static Web page page; Need not utilize static masterplate just can dynamic web page be transformed into static Web page; Only need the file content of the dynamic web page through reading the static Web page page to be generated static source code and the text-converted with static source code that will get access to, preserve into the static Web page file; Thereby dynamic web page is transformed into static Web page; Then with said static Web page file be sent to by access server by access location; Efficient height and exploitation amount are low, have solved because the website and webpage page is the non-static Web page page, and have constantly become big and cause visiting slack-off several times problem through data accumulation, data volume for many years.
Description of drawings
Fig. 1 is the process flow diagram of the generation method of the static Web page page of the present invention;
Fig. 2 is an embodiment process flow diagram of the generation method of the static Web page page of the present invention;
Fig. 3 is an embodiment process flow diagram of the generation method of the static Web page page of the present invention;
Fig. 4 is the module connection layout of the generating apparatus of the static Web page page of the present invention.
Embodiment
By specifying technology contents of the present invention, structural attitude, realized purpose and effect, give explanation below in conjunction with embodiment and conjunction with figs. are detailed.
See also Fig. 1, the present invention provides a kind of generation method of the static Web page page, may further comprise the steps:
S101, read the static source code of file content of the dynamic web page of the static Web page page to be generated;
S102, obtain text, and said text-converted is become the static Web page file with said static source code;
S103, with said static Web page file be sent to by access server by access location.
Pass through above-mentioned steps; Directly read the static Web page page to be generated dynamic web page file content the static source code and the text-converted with static source code that will get access to, preserve into the static Web page file; Thereby dynamic web page is transformed into static Web page; Need not a large amount of code revisions and development, do not have the transformation on the code for original web, efficient height and exploitation amount are low.Then with said static Web page file be sent to by access server by access location.The web page files of being visited the static Web page file that generates as quilt like this; Former living document is underground to be conducted interviews by network client; Only visited by the generating apparatus of the static Web page page; So just improved this greatly by the access response speed of the website of access server support, and reduced and reduce by the visit expense of access server.Preferably, the text with static source code that gets access to is preserved into the static Web page file of suffix html by name or htm.
In some embodiment as shown in Figure 2, step S101 specifically comprises the steps:
S1011, set up and be connected by the network of access server with the dynamic web page of the said static Web page page to be generated in being connected of data stream;
S1012, read the static source code of the dynamic web page full page of the said static Web page page to be generated.
In this embodiment; The method that reads static source code is: carry out earlier be connected by the network of access server with the dynamic web page of the said static Web page page to be generated in being connected of data stream, obtain the data stream of the dynamic web page full page of the said static Web page page to be generated again.
In the preferred embodiment, the present invention adopts the foundation of URL class technology and is connected by the network of access server.Preferred used procotol is a http network connection protocol.In the art, URL (Uniform Resource Locator) is writing a Chinese character in simplified form of WWW (WWW) resource uniform resource locator, its standard the method for expressing of WWW resource network positioning address.The WWW resource comprises Web page or leaf, text, graphic file, audio frequency fragment etc.URL has defined the characteristic of WWW resource and has read the method for its content, and its basic representation form is following: " protocol: //hostname:/resourcename#anchor ".The URL class then is the content that is used for handling relevant URL.The present invention also adopts data stream class technology to accomplish being connected, transmitting, reading and writing of data stream in the dynamic web page with the said static Web page page to be generated.
In preferred some embodiment, it is that form with single character reads that the present invention obtains data stream.The content of utilizing URL class and data stream class technology to read has been through the static source code after the compiling; So after reading through the said process completion; Get access to text, directly preserve into text the static Web page file of suffix html by name or htm with said static source code.So just accomplished the conversion of the dynamic web page page and the static Web page page.
Can find out by preamble is said, adopt scheme provided by the invention to convert dynamic web page to static Web page, efficient is high and need not a large amount of code revisions and development, and is simple and convenient.
In certain embodiment as shown in Figure 3, the present invention can also be provided with the cycle, termly being generated static Web page by the dynamic web page of access websites.Step S101 " reads the static source code of file content of the dynamic web page of the static Web page page to be generated " and also comprises step S100 before: judge whether to arrive the generation cycle; If then carry out the static source code of file content that step reads the dynamic web page of the static Web page page to be generated; If not, then continue to judge whether to arrive the generation cycle.So just generate static Web page to dynamic web page termly, reduce and reduce by the visit expense of access server.
See also Fig. 4, the present invention provides a kind of generating apparatus of the static Web page page, comprising:
Read module is used to read the static source code of file content of the dynamic web page of the static Web page page to be generated;
Modular converter is used to obtain the text with said static source code, and said text-converted is become the static Web page file;
Delivery module, be used for said static Web page file be sent to by access server by access location.
The present invention directly read through read module the static Web page page to be generated dynamic web page file content static source code and utilize modular converter to obtain text with said static source code; And said text-converted become the static Web page file; Thereby dynamic web page is transformed into static Web page, does not have the transformation on the code for original web.Then delivery module with said static Web page file be sent to by access server by access location.The web page files of being visited the static Web page file that generates as quilt like this; Former living document is underground to be conducted interviews by network client; Only visited by the generating apparatus of the static Web page page; So just improved this greatly by the access response speed of the website of access server support, and reduced and reduce by the visit expense of access server.Preferably, the text with static source code that gets access to is preserved into the static Web page literary composition of suffix html by name or htm.
In certain embodiments, said read module comprises:
Linkage unit, be used for setting up be connected by the network of access server with being connected of the dynamic web page data stream of the said static Web page page to be generated;
Acquiring unit is used to read the static source code of the dynamic web page full page of the said static Web page page to be generated.
In a preferred embodiment, said linkage unit is to utilize the URL class to accomplish being connected of network and data stream with data stream class technology.
In a preferred embodiment, said acquiring unit is that form with single character reads said static source code.
The generating apparatus of the static Web page page of the present invention also comprises: judge module; Be used to judge whether to arrive the generation cycle, and trigger the static source code of file content that said read module reads the dynamic web page of the static Web page page to be generated under the situation in generation cycle arriving.
In sum, be different from and use the masterplate mode to generate static page in the prior art, need the development amount of a large amount of masterplates, to some have developed completion and operation website for many years, can produce very big code revision and development; And these websites have been moved a lot of years, and huger data volume is arranged, and use the efficient of masterplate mode also very low.The present invention provides a kind of generation method and device of the static Web page page; Need not utilize static masterplate just can dynamic web page be transformed into static Web page; Only need the file content of the dynamic web page through reading the static Web page page to be generated static source code and the text-converted with static source code that will get access to, preserve into the static Web page file; Thereby dynamic web page is transformed into static Web page; Then with said static Web page file be sent to by access server by access location; Efficient height and exploitation amount are low, have solved because the website and webpage page is the non-static Web page page, and have constantly become big and cause visiting slack-off several times problem through data accumulation, data volume for many years.
The above is merely embodiments of the invention; Be not so limit claim of the present invention; Every equivalent structure transformation that utilizes instructions of the present invention and accompanying drawing content to be done, or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.
Claims (10)
1. the generation method of a static Web page page is characterized in that, may further comprise the steps:
Read the static source code of file content of the dynamic web page of the static Web page page to be generated;
Obtain text, and said text-converted is become the static Web page file with said static source code;
With said static Web page file be sent to by access server by access location.
2. the generation method of the static Web page page according to claim 1 is characterized in that, the step of the static source code of the file content of the said dynamic web page that reads the static Web page page to be generated may further comprise the steps:
Set up be connected by the network of access server with the dynamic web page of the said static Web page page to be generated in being connected of data stream;
Read the static source code of the dynamic web page full page of the said static Web page page to be generated.
3. the generation method of the static Web page page according to claim 2 is characterized in that: utilize the URL class to accomplish being connected of network and data stream with data stream class technology.
4. the generation method of the static Web page page according to claim 2 is characterized in that: be that form with single character reads when reading said static source code.
5. according to the generation method of each described static Web page page of claim 1 to 4; It is characterized in that, also comprise step before the step of the static source code of the file content of the said dynamic web page that reads the static Web page page to be generated: judge whether to arrive the generation cycle; If then carry out the static source code of file content that step reads the dynamic web page of the static Web page page to be generated; If not, then continue to judge whether to arrive the generation cycle.
6. the generating apparatus of a static Web page page is characterized in that comprising:
Read module is used to read the static source code of file content of the dynamic web page of the static Web page page to be generated;
Modular converter is used to obtain the text with said static source code, and said text-converted is become the static Web page file;
Delivery module, be used for said static Web page file be sent to by access server by access location.
7. the generating apparatus of the static Web page page according to claim 6 is characterized in that, said read module comprises:
Linkage unit, be used for setting up be connected by the network of access server with being connected of the dynamic web page data stream of the said static Web page page to be generated;
Acquiring unit is used to read the static source code of the dynamic web page full page of the said static Web page page to be generated.
8. the generating apparatus of the static Web page page according to claim 7 is characterized in that: said linkage unit is to utilize the URL class to accomplish being connected of network and data stream with data stream class technology.
9. the generating apparatus of the static Web page page according to claim 7 is characterized in that: said acquiring unit is that the form with single character reads said static source code.
10. according to the generating apparatus of each described static Web page page of claim 6 to 9; It is characterized in that also comprising: judge module; Be used to judge whether to arrive the generation cycle, and trigger the static source code of file content that said read module reads the dynamic web page of the static Web page page to be generated under the situation in generation cycle arriving.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012100236087A CN102609503A (en) | 2012-02-02 | 2012-02-02 | Method and device for generating static webpages |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012100236087A CN102609503A (en) | 2012-02-02 | 2012-02-02 | Method and device for generating static webpages |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102609503A true CN102609503A (en) | 2012-07-25 |
Family
ID=46526875
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2012100236087A Pending CN102609503A (en) | 2012-02-02 | 2012-02-02 | Method and device for generating static webpages |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102609503A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103383645A (en) * | 2013-07-29 | 2013-11-06 | 北京邮电大学 | Code generation method and system |
CN103618773B (en) * | 2013-11-19 | 2017-02-08 | 北京国双科技有限公司 | Display method, device and system for thermodynamic diagrams |
WO2017113963A1 (en) * | 2015-12-31 | 2017-07-06 | 华为技术有限公司 | Static webpage processing method and device |
CN107766509A (en) * | 2017-10-23 | 2018-03-06 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of webpage static backup |
CN110516190A (en) * | 2019-08-30 | 2019-11-29 | 深圳点猫科技有限公司 | Generate the method and apparatus of static Web page |
CN110516183A (en) * | 2019-08-30 | 2019-11-29 | 深圳点猫科技有限公司 | The generation method and device of static Web page |
CN112468840A (en) * | 2020-11-23 | 2021-03-09 | 河北广电无线传媒股份有限公司 | Tamper-proof system and method for third-party EPG server in IPTV system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101127038A (en) * | 2006-08-18 | 2008-02-20 | 鸿富锦精密工业(深圳)有限公司 | System and method for downloading website static web page |
CN101183395A (en) * | 2007-12-25 | 2008-05-21 | 北京中企开源信息技术有限公司 | Method and system for realizing staticize of dynamic page |
CN101539920A (en) * | 2008-03-20 | 2009-09-23 | 英业达股份有限公司 | System for automatically converting webpage format and method thereof |
-
2012
- 2012-02-02 CN CN2012100236087A patent/CN102609503A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101127038A (en) * | 2006-08-18 | 2008-02-20 | 鸿富锦精密工业(深圳)有限公司 | System and method for downloading website static web page |
CN101183395A (en) * | 2007-12-25 | 2008-05-21 | 北京中企开源信息技术有限公司 | Method and system for realizing staticize of dynamic page |
CN101539920A (en) * | 2008-03-20 | 2009-09-23 | 英业达股份有限公司 | System for automatically converting webpage format and method thereof |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103383645A (en) * | 2013-07-29 | 2013-11-06 | 北京邮电大学 | Code generation method and system |
CN103383645B (en) * | 2013-07-29 | 2016-05-11 | 北京邮电大学 | Code generating method and system |
CN103618773B (en) * | 2013-11-19 | 2017-02-08 | 北京国双科技有限公司 | Display method, device and system for thermodynamic diagrams |
WO2017113963A1 (en) * | 2015-12-31 | 2017-07-06 | 华为技术有限公司 | Static webpage processing method and device |
CN107766509A (en) * | 2017-10-23 | 2018-03-06 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of webpage static backup |
CN110516190A (en) * | 2019-08-30 | 2019-11-29 | 深圳点猫科技有限公司 | Generate the method and apparatus of static Web page |
CN110516183A (en) * | 2019-08-30 | 2019-11-29 | 深圳点猫科技有限公司 | The generation method and device of static Web page |
CN112468840A (en) * | 2020-11-23 | 2021-03-09 | 河北广电无线传媒股份有限公司 | Tamper-proof system and method for third-party EPG server in IPTV system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102609503A (en) | Method and device for generating static webpages | |
CN101853293B (en) | Adaptive paging method and device | |
CN107808010A (en) | A kind of pop-up page generation method, device, browser and storage medium | |
CN102662928A (en) | Rich text editing method for importing documents and device thereof | |
CN102750281B (en) | A kind of script processing method of browser and system | |
CN104573025A (en) | Method and system for increasing page loading rate | |
CN103440264B (en) | The realization method and system of electric power field operation form | |
CN103488732A (en) | Generation method and device of static pages | |
CN103389969A (en) | Method, device and system for previewing PDF (portable document format) file on mobile terminal | |
CN102662600A (en) | Method for mutually dragging files at different domain names | |
CN101500002A (en) | Fusion publishing method and apparatus oriented to Web content | |
CN101963992A (en) | Method and browser for increasing webpage display speed | |
CN103049439A (en) | Processing method for markup language documents, browser and network operating system | |
CN109697130A (en) | Front and back end separation method, device, equipment and the storage medium of web system | |
CN103164446A (en) | Webpage request information response method and webpage request information response device | |
CN103631806A (en) | Network information fetching method and device | |
CN103336794A (en) | Method and device for providing corresponding presence information on destination page | |
CN102495882A (en) | System and method for binding page object and database field in Java environment | |
CN103577447A (en) | Method and equipment used for determining page type information of target pages | |
CN103034496B (en) | Based on the Locally-static portal generation method of template | |
KR101287371B1 (en) | Method and Device for Collecting Web Contents and Computer-readable Recording Medium for the same | |
CN102955852A (en) | Method, device and equipment for webpage resource processing | |
CN102915371A (en) | Method for dynamically referencing files on web page | |
CN102497478A (en) | Method for cellphone users to access internet quickly | |
CN108319653A (en) | Web page resources document handling method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120725 |