{"id":41,"date":"2008-08-28T00:00:13","date_gmt":"2008-08-28T00:00:13","guid":{"rendered":"http:\/\/bloodforge.com\/?p=41"},"modified":"2020-02-20T01:59:06","modified_gmt":"2020-02-20T01:59:06","slug":"server-side-includes-ssi-adding-a-blank-empty-line-to-html-page","status":"publish","type":"post","link":"https:\/\/bloodforge.azurewebsites.net\/index.php\/2008\/08\/28\/server-side-includes-ssi-adding-a-blank-empty-line-to-html-page\/","title":{"rendered":"Server Side Includes (SSI) adding a blank\/empty line to HTML page"},"content":{"rendered":"\n<p>While creating a page that used server side includes, I ran into some very strange behavior.&nbsp; Right before each SSI, a blank line would appear on the page.&nbsp; It didn&#8217;t have anything to do with margins or padding.&nbsp; It was just like an empty line appeared right out of nowhere, messing up the layout.&nbsp; First, I thought it was some problem with IIS and SSI, but I couldn&#8217;t find anything there.<\/p>\n\n\n\n<p>After a few hours of frustration and trying the weirdest solutions I could think of, I started playing around with saving the include files with different file names.&nbsp;Well, when I got to the *.txt, I noticed that Visual Studio gives me a new option under &#8220;Save As&#8221;&#8230; its &#8220;Advanced Save Options&#8221;.&nbsp;When I looked at the encoding of the file, it was set to &#8220;Unicode (UTF-8 with signature)&nbsp;&#8211; Codepage 65000&#8221;.&nbsp; I then switched to &#8220;Unicode (UTF-8 without signature) &#8211; Codepage 65001&#8221;, and the blank lines disappeared.&nbsp;<\/p>\n\n\n\n<p>It appears that Visual Studio picks an encoding when saving pages that doesn&#8217;t really produce desirable effects when using server side includes.&nbsp; However, you can go to File -&gt; Advanced Save Options and select a different&nbsp;encoding.&nbsp; I&#8217;m not sure how to set the one w\/o signature as the default yet, but hopefully soon I&#8217;ll figure that out \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While creating a page that used server side includes, I ran into some very strange behavior.&nbsp; Right before each SSI, a blank line would appear on the page.&nbsp; It didn&#8217;t have anything to do with margins or padding.&nbsp; It was just like an empty line appeared right out of nowhere, messing up the layout.&nbsp; First, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/41"}],"collection":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/comments?post=41"}],"version-history":[{"count":1,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/41\/revisions"}],"predecessor-version":[{"id":42,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/41\/revisions\/42"}],"wp:attachment":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/media?parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/categories?post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/tags?post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}