title: Maintain an iframe context
body: <p>My first post here! My question relates to iframes and php mostly </p>
  
  <p>So... it's impossible for PHP to check if a page was requested through an iframe. This question seems to be asked (and answered) a lot, but would it be possible to create an "iframe context" and maintain that context throughout the navigation within an iframe?</p>
  
  <p>For example :</p>
  
  <pre><code>&lt;iframe src="/my/url?location=iframe"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>we could initially check if ($_GET['location'] == 'iframe')</p>
  
  <p>however, as navigation goes on, you can imagine what happens. Links are click, forms are submitted, and they don't necessarily have ?location=iframe.</p>
  
  <p>So, I'm trying to figure out how to create an initial context that begins with the url parameter above and persists within the iframe only.</p>
  
  <p>Just to be clear, in my example the iframe contains pages from the same site.</p>
  
  <p>Thanks for your help.</p>