Reference (SET) method of some modules shared by static websites.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.