Recently when loading submodules with SSI (Server Side includes), I found a strange phenomenon, the Web page after loading is always a problem with CSS, the loading module is always empty after rendering. A simple example is given below.
The contents of the file a.html are as follows:
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <style>5 *{6 margin:0;7 padding:0;8 }9 #ah{Ten Border:Solid 2px Red; One } A #bh{ - Border:Solid 2px Black; - } the </style> - </Head> - <Body> - <H1ID= "Ah">AH</H1> + <!--#include file= "b.html" - - </Body> + </HTML>
The included file b.html content is as follows:
1 <H1 id= "BH">bh</H1 >
Finally published on IIS, the results are as follows:
Ah and BH in the middle of a blank line, baffled the solution, and even began to doubt their own CSS level, but also began to doubt their own life ...
Finally opened with notepad++, looked under the code, shocked:
Instant comprehension, save it as a UTF-8 format without BOM, the effect of accessing the page again is as follows:
Finally show normal, the evil of the BOM (Byte Order Mark), the evil of the Notepad, but also in Notepad to write the program's experts, change a text editor:)
UTF-8 the effect of no BOM coding on SSI