title: Good practices for including a menu in a website?
body: <p>I'm quite new to website building. Yet do have some experience in LaTeX and some other programming languages. </p>
  
  <p>I really try and reuse code etc. So, when building my website, I want to "<em>include</em>" for instance the menu in the other pages, in stead of explicitly copy-pasting it in. </p>
  
  <p>There are several ways I know of that can do this:</p>
  
  <ul>
  <li>the menu is a static page, your content is in an iframe. This is the worst way to do this, since it breaks a lot of stuff such as back/forward etc... (which I know might be wishable for some, but not in my case).</li>
  <li><p>This is what I'm using now: every web page includes the menu using an iframe:</p>
  
  <pre><code>&lt;iframe src="menu.html" class="menu" height="100%" frameborder="0"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>the downside to this method is: the menu doesn't get reloaded properly when people revisit your website, unless you use some scripting that specifically tells the browser to do this:</p>
  
  <pre><code>document.getElementById('some_frame_id').contentWindow.location.reload();
  </code></pre></li>
  <li><p>This is what I was thinking of since my new host allows this: including the the menu using SSI. </p>
  
  <pre><code>&lt; !--#include virtual="/menu.html"--&gt;
  </code></pre>
  
  <p>The possible downside is that every webpage must allow for the includes, and thus has to be parsed (this slows down the filesystem). Security is not a problem for me.</p></li>
  </ul>
  
  <p>What would you recommend? Are there courtesy rules of what should be done?
  Are compatibility problems with any of the methods described above? Are there better methods?</p>
  
  <p>For instance: I'm suspecting the second method (which I'm using now) breaks google indexing, so only my homepage gets indexed. (I'm not sure if this is true though).</p>