title: Track only iframe history
body: <p>I have a page which contains an iframe and I want to track the history of the iframe only. 
  I tried to use the history object like this:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;script type="text/javascript"&gt;
          function checkFrameHistory() {
              alert(window.frames["test2"].history.length);
          }
  
          function checkThisHistory() {
              alert(history.length);
          }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
  
          &lt;iframe name="test2" src="test2.html"&gt;&lt;/iframe&gt;
  
          &lt;div&gt;
              &lt;input type="button" onclick="checkFrameHistory()" value="Frame history"/&gt;
              &lt;input type="button" onclick="checkThisHistory()" value="This history"/&gt;
          &lt;/div&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>test2.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;script type="text/javascript"&gt;
          function checkMyHistory() {
              alert(history.length);
          }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;div&gt;
          Test2
      &lt;/div&gt;
  
      &lt;div&gt;
          &lt;input type="button" onclick="checkMyHistory()" value="My history"/&gt;
      &lt;/div&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>but it actually gave me the history including the parent window. </p>
  
  <p>For instance, I went to another site in the main window and came back to my iframe test site. Both <code>window.frames["test2"].history.length</code> and <code>history.length</code> still gave me the same count by increasing the length by 2. </p>
  
  <p>Did I do it wrong? Is there a way to track only the iframe history?</p>