title: Less CSS and local storage issue
body: <p>I'm using LESS CSS (more exactly less.js) which seems to exploit LocalStorage under the hood. I had never seen such an error like this before while running my app locally, but now I get "Persistent storage maximum size reached" at every page display, just above the link the unique .less file of my app.</p>
  
  <p>This only happens with Firefox 12.0 so far.</p>
  
  <p>Is there any way to solve this?</p>
  
  <p>P.S.: mainly inspired by <a href="https://stackoverflow.com/questions/3027142/calculating-usage-of-localstorage-space">Calculating usage of localStorage space</a>, this is what I ended up doing (this is based on Prototype and depends on a custom trivial Logger class, but this should be easily adapted in your context):</p>
  
  <pre><code>"use strict";
  var LocalStorageChecker = Class.create({
      testDummyKey: "__DUMMY_DATA_KEY__",
      maxIterations: 100,
      logger: new Logger("LocalStorageChecker"),
      analyzeStorage: function() {
          var result = false;
          if (Modernizr.localstorage &amp;&amp; this._isLimitReached()) {  
              this._clear();
          }
          return result;
      },
      _isLimitReached: function() {
          var localStorage = window.localStorage;
          var count = 0;
          var limitIsReached = false;
          do {
              try {
                  var previousEntry = localStorage.getItem(this.testDummyKey);
                  var entry = (previousEntry == null ? "" : previousEntry) + "m";
                  localStorage.setItem(this.testDummyKey, entry);
              }
              catch(e) {
                  this.logger.debug("Limit exceeded after " + count + " iteration(s)");
                  limitIsReached = true;
              }
          }
          while(!limitIsReached &amp;&amp; count++ &lt; this.maxIterations);
          localStorage.removeItem(this.testDummyKey);
          return limitIsReached;
      },
      _clear: function() {
          try {
              var localStorage = window.localStorage;
              localStorage.clear();
              this.logger.debug("Storage clear successfully performed");
          }
          catch(e) {
              this.logger.error("An error occurred during storage clear: ");
              this.logger.error(e);
          }
      }
  });
  
  
  document.observe("dom:loaded",function() {
      var checker = new LocalStorageChecker();
      checker.analyzeStorage();
  });
  </code></pre>
  
  <p>P.P.S.: I didn't measure the performance impact on the UI yet, but a decorator could be created and perform the storage test only every X minutes (with the last timestamp of execution in the local storage for instance). </p>