<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,73 @@
 *DBScriptCache*  
-*by Ian Collins*
+*by Ian Collins (3n)*
 
 BREIF OVERVIEW
 ==============
+  DBScriptCache (db\_script\_cache.js) automatically caches script files in the
+  browser's HTML5 client-side database. Rather than including your scripts
+  using script tags, you include them using this script. The first time a 
+  user views the page the scripts will be pulled into the db and stored. 
+  On subsequent visits the scripts will be loaded from the db cache and 
+  not from your server. The script will continue to come from the cache until
+  you supply a new version number or change the name of the script. 
 
-if (!$3n.dom_is_ready) window.fireEvent('domready');
\ No newline at end of file
+  Why oh why would you want to do something like this? Why not just rely on 
+  the browser's built in cache and expires headers? iPhone. No files larger
+  than 25K are cached on the current version of MobileSafari on iPhone. On 
+  top of this, hard resets, relatively small durations of time and storage caps
+  clear the cache entirely. And we all know how slow Edge can be, especially 
+  when pulling down 80K of some Javascript library (on top of your own). 
+
+  But you shouldn't be using Javascript libraries on sites meant for iPhone!
+  Too bad, I like using Mootools. MobileSafari is a champ and can handle lots
+  of awesome Javascript - just check out www.powerset.com on your iPhone.
+  
+  What if the user's browser doesn't have openDatabase? It will just inject
+  the script tags manually and you'll get the standard behavior. 
+  
+  I'm aware that this is a pretty ridiculous thing to do, and trust me I'm
+  still not sure why I made this. But, it works great and reduces load times
+  on iPhone from almost a minute to about 2 seconds for my site www.iancollins.me. 
+  
+USAGE
+-----
+  If possible, only use DBScriptCache on the iPhone version of your site. 
+  However, it should work just fine if you included in all versions. 
+
+  When you would normally have this code to include your scripts in your HEAD:
+  
+    &lt;script type=&quot;text/javascript&quot; src=&quot;mootools-1.2.1-core.js&quot;&gt;&lt;/script&gt;
+    &lt;script type=&quot;text/javascript&quot; src=&quot;scriiip.js&quot;&gt;&lt;/script&gt;    
+  
+  You instead have this:
+  
+    &lt;script type=&quot;text/javascript&quot; src=&quot;cache_loader.js&quot;&gt;
+      window.script_cache = window.script_cache || new ScriptCache();
+      window.script_cache.includes([ 
+        ['mootools-1.2.1-core.js','1.0'], 
+        ['scriiip.js'            ,'1.0'] 
+      ]);
+    &lt;/script&gt;
+    
+  Update the version numbers whenever the script changes. Yes, I see that the 
+  version number is a string - just change it to whatever and you'll get a new 
+  version. You could have &quot;lol&quot; as your version number and it'd be fine.
+  
+  Check it out in &quot;production&quot; at http://www.iancollins.me.  
+
+CAVEATS
+-------
+  1. Since DBScriptCache currently uses eval() to run the cached scripts there 
+     is a slight issue with scope: if you define a bunch of local variables and 
+     assume they will be tied to the window object outside of the eval execution
+     you may run into problems. The only time this has been an issue for me is
+     using JsonP, which calls a global function you specify when some data is done
+     loading. To fix this I just made sure my callback function was manually
+     attached to window by doing &quot;window.JsonP = ...&quot;. 
+  2. If you do a lot of initialization in a domready function (I know I do) you 
+     may run into a problem where your domready callback is never fired. This is 
+     because the dom will sometimes be ready before the eval() is called. To fix
+     this just fire the domready function manually if it hasn't been run (at the
+     bottom of your script). Example using Mootools:
+
+        if (!$3n.dom_is_ready) window.fireEvent('domready');
\ No newline at end of file</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -9,10 +9,9 @@
   	&lt;script type=&quot;text/javascript&quot; src=&quot;cache_loader.js&quot;&gt;
       window.script_cache = window.script_cache || new ScriptCache();
       window.script_cache.includes([ 
-        ['mootools-1.2.1-core.js','1x4'], 
-        ['scriiip.js'            ,'1x4'] 
+        ['mootools-1.2.1-core.js','1.0'], 
+        ['scriiip.js'            ,'1.0'] 
       ]);
-
     &lt;/script&gt;
   &lt;/head&gt;
   </diff>
      <filename>index.html</filename>
    </modified>
    <modified>
      <diff>@@ -3,4 +3,4 @@
 var scripts = '&lt;blah';
 var replaced = &quot;&lt;hello world&quot;.replace(/&lt;h/gi,'x');
 document.body.innerHTML = &quot;THIS TEXT BROUGHT TO YOU BY JAVASCRIPT&lt;br/&gt;&lt;br/&gt;If you can see this, then scriiip.js was loaded properly - WORD.&quot;;		
-document.body.innerHTML += &quot;&lt;br/&gt;Mootools says your browser engine is: &quot; + Browser.Engine.name + &quot; - looks like Mootools was loaded as well - NICE.&quot;;
\ No newline at end of file
+document.body.innerHTML += &quot;&lt;br/&gt;Mootools says your browser engine is: &quot; + Browser.Engine.name + &quot; - looks like Mootools was loaded as well - NICE.&quot;;</diff>
      <filename>scriiip.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a1978786c81c3b57f89f7e3f956317fefb85531a</id>
    </parent>
  </parents>
  <author>
    <name>Ian Collins</name>
    <email>ian@powerset.com</email>
  </author>
  <url>http://github.com/3n/db-script-cache/commit/087777608a46a0c3501bcb731a0f3906ae3b1d9f</url>
  <id>087777608a46a0c3501bcb731a0f3906ae3b1d9f</id>
  <committed-date>2009-02-11T17:43:41-08:00</committed-date>
  <authored-date>2009-02-11T17:43:41-08:00</authored-date>
  <message>reeeadme</message>
  <tree>32d567bebef208f84095e5cc56a562e8f3403857</tree>
  <committer>
    <name>Ian Collins</name>
    <email>ian@powerset.com</email>
  </committer>
</commit>
