Everyone knows that we have their own suffixes every day, and different suffixes correspond to different document formats and different regulations, agreements, and usage. The most common suffix names are. HTML and .htm, there are common .shtml and .shtm formats. Most of our developers only know that they are not different and can be used arbitrarily. I do n’t know that there are still some connections in it. I summarized it and share it with you.
First of all, introduce .html and .htmlHTML is one of the most basic and most widely used preservation formats in today's web files. It is a super -text marker language. It is a description language of WWW. Different formats, there is no statement to be executed by any server on the page. It is a static page format. Generally, the browser can directly interpret and display it.
Regarding HTM, there is actually no essential difference from HTML. It is just to meet the file name specifications of the 8+3 (file name cannot exceed 8 characters, and the extension cannot exceed 3 characters). Because some old system (32 -bit) cannot identify the extension of the 4 -digit files, some server requires the last L of the .html to omit. The browser can automatically identify and open these files, but when writing these webpages, it must be corresponding, that is, Index.html and Index.htm are two different files, corresponding to different addresses.
Second, introduce .shtml and .shtmAbout SHTML is a file based on SSI technology, that is, the instructions containing the Server Side Include-SSI server segment. Some Web Server will specially entertain the SHTML file if you have the SSI function. The server will first scan first first scan first scan See if there is a special SSI instruction in a SHTML file, if so, explain the SSI instruction according to the setting rules of the Web Server, and then explain it with the ordinary HTML explaining and displayed with the ordinary HTML.
About SHTM, the relationship between SHTM and SHTML is roughly similar to the relationship between HTM and HTML. I won't go into details here ...
Finally, the relationship between HTML or HTM and SHTML or SHTMHTML or HTM is a static page format, which means that there is no need to analyze the script in it, or there are no server executing scripts in it, and SHTML or SHTM is based on SSI technology, when the server executes script is based Look at it as a dynamic language, just like PHP, JSP or ASP.
When SHTML or SHTM does not include the server -side executable script, its role is the same as HTML or HTM.
The difference between Shtml and HTML, if you use a sentence to explain: SHTML is not HTML but a server API, SHTML is HTML for the server dynamic.
Although both are super -text formats, SHTML is a file for SSI technology. That is, the Server Side Include-SSI server contains instructions. If Web Server has SSI functions (mostly (especially the Unix platform) Web server such as NetScape Enterprise Server supports SSI commands).
It will specially entertain Shtml files. Sweep the SHTML file first to see that there is no special SSI instruction now.
If you set the web server, set the SSI instructions. After the explanation, we will go away with the average HTML.
shtmlWith the HTML file extension of the SSI (Server Side Include), the SSI (Server Side Include) is usually referred to as the server -side embedded or server. It is a server -based web -based production technology similar to ASP.
SSI working principle:Before sending the content to the browser, you can use the server side to include (SSI) instructions to include text, graphics or application information to the webpage. For example, SSI can be used to include a form/date stamp, copyright statement or a form for customers to fill in and return. The use of text or graphics that appear repeatedly in multiple files is a simple method. Stay the content into a file without having to enter the content into all files. You can call the file with a very simple statement. This statement indicates that the web server inserts the content into the appropriate webpage. Moreover, when using a file, all changes to the content can be completed in one place.
Because the files containing SSI instructions are specially processed, the SSI file extension must be given to all SSI files. The default extension name is .stm, .shtm and .shtml
The web server handles the SSI instruction while processing the webpage. When the web server encounters an SSI instruction, insert the content containing the file into the HTML webpage directly. If the file contains SSI instructions, this file is inserted at the same time. In addition to the basic instructions containing files, you can also use the SSI instruction to insert the relevant information (such as the size of the file) or run the application or shell command.
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 in the future is only 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. Automatically generate web pages according to the template, making it easier to manage large websites.
Therefore, the purpose of the page in the SHTML format is similar to ASP, but because it is an API, it has a faster operating speed, higher efficiency, faster than ASP, and slower than HTML. However Update Banner in batches, copyright, etc.), think about it, you have a section of HTML, you need to insert some special server scripts in the middle, such as inserting other HTML paragraphs, you choose ASP to complete this task, but if the task is more heavier, you need to be more needed more. Time, for example, 5 s. At this time, you do n’t need ASP to use SHTML, maybe the processing time is only 4 s.