title: How can I prevent content from unauthorized views (php/js)
body: <p>How can I prevent (unauthorized) people from reading a message on a website (e.g. by looking in the browser cache for the text/images)?**</p>
  
  <ul>
  <li><strong>It's a PUBLIC (!) site</strong> (means: no logins here!)</li>
  </ul>
  
  <p>But: </p>
  
  <ul>
  <li><p>the (secret) message is only shown for a certain time.</p></li>
  <li><p>the message might be shown only if a passwort is given.</p></li>
  </ul>
  
  <p>Problems:</p>
  
  <ul>
  <li><p>In Opera for example page(=page contents/text) could be indexed by the browser and searched.</p></li>
  <li><p>One idea was to create an image with the message ... but: Also images - even when a header "no cache" is send could be retrieved from FireFox's cache.</p></li>
  <li><p>Also: Recreating the message from single characters as image does not work (at least I think so at the moment). I tried this method, but it makes output quite slow (writing this: I notice that I do not need to create the images at runtime, but could create images (of single letters) in advance and display/refer to them not by real, but pseudo random names in the HTML )</p></li>
  <li><p>I also had the idea to output a encoded message (ROT13) (in HTML) but use JS .onload to decode the message immediately. Problem: If this code is in the HTML it could be recovered from the cache later on. At least if someone searches through the (Opera) cache the person would probably not think of entering search terms encoded.</p></li>
  </ul>
  
  <p>Programming language is PHP.</p>