title: Hold Websocket-Connection over several pages
body: <p>I need an idea in designing a complex html/javascript(jQuery) system communicating with my C++-Webserver. </p>
  
  <p>Until now i have a main index.html and I load Submodules by events:</p>
  
  <pre><code>$(".MainButton").click(function(){
     $("#swap").load($(this).attr('alt'));
  });
  </code></pre>
  
  <p>The problem is now that every Submodule needs a Websocket Connection and I dont want to open a new Connection for every Submodule that I am loading.</p>
  
  <p>Is it possible to open a global Websocket connection..</p>
  
  <pre><code>var ws = new WebSocket("ws://localhost:800/stream");
  </code></pre>
  
  <p>.. and use ws in every subpage?</p>
  
  <p>Thank you very much.</p>