Reference (SET) method of some modules shared by static websites.
Static websites use a common header and tail to facilitate website maintenance and management. If you modify the header content and advertisement of a page, you can modify the header and tail of the entire website on only one page.
1: Use the ssi technical page to generate a shtml file, and only add it to the header file location <! -- # Include file = "header.html" -->; after modification, you only need to modify the header.html file. The advantage of using shtml is that it is more friendly to search engines. The files to be processed are completed on the server side and will not increase the burden on the visitor's browser.
2: Use js
Create a head. js file,
Find an html-to-js website
Then convert the html code in your header into js Code and put it in the head. js file.
Add
<Script language = "javascript" type = "text/javascript" src = "js/head. js"> </script>
The src = "js/head. js" path is the path of your head. js file.
This is enough ~
This method is convenient and easy to modify. The disadvantage is that the search engine does not understand javascript files, and the header and tail file search engines cannot be included. Moreover, js files are too popular to increase the burden on the visitor's browser and affect access speed.
3: Use iframe
In the past, people often used static frame frameworks for the first and last steps (generally not iframe ). It is now increasingly rare. This is mainly because it is relatively difficult to design webpages, and it also increases the number of connections, which is not conducive to the search engine's indexing of headers and tails.