In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shows you the difference between .html and .htm and .shtml and .shtm extensions in HTML development. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Many friends have just come into contact with web page production and found that with so many extension names, htm and html are the same, shtm and shtml are the same, note that it is recommended to use the same suffix name for website optimization, basically for visitors, html and htm can be two different content.
.htm VS .html
First, let's look at the difference between .htm and .html files. The answer is: they are the same.
In fact, it's just a matter of personal preference, just keep the same suffix. Traditionally, windows usually uses the suffix .htm, while linux (unix) uses the .html suffix (in linux, if you open the file of .htm, the source code is displayed directly). This is because a long time ago, the platform of the operating system (DOS) was window 3.x.x, and the system had an 8.3 naming convention for files, that is, the file name could only be 8 characters and the suffix could only be 3 characters, so the .html suffix obviously could not be used at that time. Now, these problems no longer exist. (I feel that .html is a little more formal, and some people think that using .htm is a return to the era of dos)
There is also a problem on the server side. If there are both index.html and index.htm files under a folder on the server side, and URL omits the following file name (such as http://www.domain.dom/dirname/), it is obvious that one file will be read before the other file (parse index.html first). In fact, we don't usually save two index files in the same folder.
.html VS .shtml
Then let's talk about the difference between .html and .shtml files. In short, .shtml files are html files plus a ssi. So, what the hell is ssi? In fact, this thing has been touched before, in Apache to enable SSI configuration to enable html to support include included in the article.
SSI is an acronym for Server Side Include. Contains the HTML text of the embedded server side containing the command. The server fully reads, analyzes, and modifies the SHTML document before it is sent to the browser. A SSI is a command or pointer that can be called through a comment line in the HTML file. SSI has a powerful function, as long as a simple SSI command can be used to achieve the entire site content update, time and date dynamic display, as well as the execution of shell and CGI scripts and other complex functions. One of the problems often encountered in website maintenance is that the structure of the website is fixed, but a large number of pages have to be redone in order to update a little content. SSI provides a simple and effective way to solve this problem. It puts the basic structure of a website into several simple HTML files (templates). In the future, all we have to do is to transfer the text to the server and let the program automatically generate web pages according to the template, thus making it easy to manage large websites.
It can be used to make some public areas of the site into independent pages, and then use this technology to embed into other pages that need the content of this area.
Mechanism:
SSI mechanism is dynamically included, rather than statically generated, by web servers such as apache, when receiving a user's request, if it parses to the SSI containing instructions, it automatically takes out the included page and embeds it into the requested page and sends it to the user as a whole page. For users, they have no idea what the server has done, but just know to get a complete page.
From the working mechanism of SSI, we know that the inclusion action occurs every time a user requests a page, so if the content of the included page changes, it can also be reflected in real time. Because of this, it is easy to realize the dynamic embedding of static pages, and we can use it to achieve the site-wide public areas, or there are a lot of repeated areas of content published as an independent static page. Then include it with SSI instructions where needed, such as the head and tail of the station, the latest news of the station, and so on.
In fact,. Html files can also open SSI, as long as the corresponding configuration in apache, once opened SSI,.html files and .shtml files can be treated the same.
AddType text/html .shtml .html
AddOutputFilter INCLUDES .shtml .html
For specific configuration methods, please refer to Apache to enable SSI configuration to enable html to include include.
As for the .shtm file, the source code is opened directly in the browser under window7 apache.
The above is the difference between .html and .htm and .shtml and .shtm extensions in HTML development. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.