title: How to store the ajax response in browser cache with jquery
body: <p>I'm trying to store the ajax response in browser cache. I know to store it for only url like (example.com), but want to store the data which having url like (<code>example.com?xyz=abc%20efg&amp;mno=hjk</code>). </p>
  
  <p>My code :</p>
  
  <pre><code>beforeSend: function () {
                  var addC=url;          // I want to add data also with this url
                  console.log(addC);
                  if (localCache.exist(addC)) {
                      printRes(localCache.get(url));
                      console.log("cached values");
                      return false;
                  }
                  return true;
              },
  </code></pre>
  
  <p>And</p>
  
  <pre><code>var localCache = {
      data: {},
      remove: function (url) {
          delete localCache.data[url];
      },
      exist: function (url) {
          return localCache.data.hasOwnProperty(url) &amp;&amp; localCache.data[url] !== null;
      },
      get: function (url) {
          console.log('Getting in cache for url' + url);
          return localCache.data[url];
      },
      set: function (url, cachedData, callback) {
          localCache.remove(url);
          localCache.data[url] = cachedData;
          if ($.isFunction(callback)) callback(cachedData);
      }
  };
  </code></pre>
  
  <p>Please anyone help me to solve this.</p>