Reference (set) method for partial modules common to static web sites

Source: Internet
Author: User

About static sites using a common head and tail, convenient site maintenance and management, if you modify the page header content and ads, you can only modify a page the entire site's head and tail have changed.

1: Use the SSI technology page to generate the sHTML file, only used in the header file location to add <!--#include file= "header.html"-->; and then modify the header.html file as soon as possible. The advantage of using shtml is that the search engine is friendly and the files that need to be processed are done on the server side without burdening the visitor's browser.

2: Using JS
Create a Head.js file,
Find an HTML to JS website
Then the HTML code of your head is converted into JS code and placed in the Head.js file.
and add it where you need to call the head file code.
<script language= "javascript" type= "Text/javascript" src= "Js/head.js" ></script>
The path to this place src= "Js/head.js" is the path to your head.js file.
You can do it like this.
The advantages of this approach are convenient and easy to modify. The disadvantage is that the search engine can not read JavaScript files, header files and tail file search engine cannot be included, and JS files to increase the visitor's browser burden, affecting the speed of access.

3: Using IFRAME
It used to be that static frame frames were used to make the end (usually not the IFRAME). It's becoming more and more rare. Mainly because the design of the page is relatively difficult, but also increased the number of connections, but also not conducive to search engine to the end of the collection.

Reference (set) method for partial modules common to static web sites

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.