Many friends just started to contact the webpage production and found that so many expansion names. In fact, both HTM and HTML are the same. The same is the same as SHTM and SHTML. Note that for website optimization, it is recommended to use the same suffix name. It can be two different content with HTM.
.htm vs .htmlFirst of all, the difference between the .htm and .html files. The answer is: they are the same.
In fact, this is just a matter of personal preference, just maintain a unified suffix name. In terms of habits, Windows usually use the suffix of the .htm suffix, while Linux (Unix) uses .html suffix (in Linux, if the file of the .htm was opened, the source code would be directly displayed). This is because a long time ago, the platform of the operating system (DOS) was Window 3.xx. The system had a 8.3 constraint on the file, that is, the file name can only be 8 characters, and the suffix can only be 3 characters. So at the time, the .html suffix was obviously unable to use. Now, these problems no longer exist. (Personally feel .html is more formal, some people think that using .htm returned to the DOS era)
Another problem is the server. If there are index.html and index.htm files under the server folder at the same time, URL omit the file name of the following (such as http://www.Domain.Dom/diRName/), then Obviously one file will be read first (analyze index.html first). In fact, we generally do not save two index files under the same folder.
.html vs .shtmlThen talk about the difference between the .html and .shtml files. Simply put, theshtml file is the HTML file plus a SSI. So, what is SSI? In fact, this stuff has been in contact before, and the SSI configuration is turned on under APache to support the Include include an article.
SSI is the first letters of the server Side Include. HTML text containing the embedded server side contains commands. Before being transmitted to the browser, the server fully reads, analyzes, and modified the SHTML document. SSI is the command or pointer that can be called by commented in the HTML file. SSI has powerful functions. As long as a simple SSI command is used to achieve the content update of the entire website, dynamic display of time and date, and complex functions such as shell and CGI script program. One problem that websites often encountered are that the structure of the website has been fixed, but in order to update a little content, it has to be re -made a large number of web pages. SSI provides a simple and effective method to solve this problem. It puts the basic structure of a website in several simple HTML files (templates). What we will do later is to pass the text to the server to let the program make the program and let the program make the program and let the program make the program and let the program make the program. Automatically generate web pages according to the template, making it easier to manage large websites.
Applying it can make some public areas in the website into an independent page, and then use this technology to embed it into other pages that need this area.
mechanism:The SSI mechanism is dynamically included, not a static generation. It is by the web server such as Apache when receiving the user's request. If it is parsed to the SSI containing instructions, the pages contained in the contained are embedded in the requested pages as it is used as a one as a requested page as it is used as a one as a request. Sending a overall page to the user, for users, I don't know what the server is doing at all, but I just know to get a complete page.
From the SSI working mechanism, we know that the action occurs when the user's request page occurs. Therefore Embeds, we can use it to realize the public areas in the website in the website, or many duplicate areas are published as an independent static page, and then the SSI instructions are included in the place where needed, such as the head and rear of the whole station and the rear of the rear. , The latest news on the whole site and so on.
In fact, the .html file can also be turned on SSI. Just configure the corresponding configuration in Apache. Once the SSI, the .html file and the .shtml file could be treated the same.
Addtype text/html .shtml .html
AddoutPutfilter Includes .shtml .html
As for the .shtm file, the source code was directly opened in the browser under Window7 Apache.