title: HTML5 - Load Web SQL DB from local file?
body: <p>Let's use a great demo as an example <a href="http://www.webkit.org/demos/sticky-notes/index.html" rel="nofollow">here</a> .</p>
  
  <p>Let's say I create 5 sticky notes as an "administrator".  My browser has a SQLite DB with these 5 sticky notes and their respective positions and text.  I then export this DB file to the local server where the page is hosted. Let's then say that a "user" on another computer loads this page up and, by default, sees my 5 sticky notes; how do I make the page load a SQLite DB from a local file, e.g. /var/www/html/db_files/5-sticky-notes.db, so that end-users can interact with my sticky notes?  </p>
  
  <p>This is the code for loading the end-user's database from their personal browser:</p>
  
  <pre><code>var db;
  
  try {
      if (window.openDatabase) {
          db = openDatabase("5-sticky-notes", "1.0", "HTML5 Database API example", 200000);
          if (!db)
              alert("Failed to open the database on disk.  This is probably because the version was bad or there is not enough space left in this domain's quota");
      } else
          alert("Couldn't open the database.  Please try with a WebKit nightly with this feature enabled");
  } catch(err) { 
  
  }
  </code></pre>