Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: dd3142a7a4
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (17 sloc) 0.863 kb
jQuery Image Cache Plugin
Cache base64 encoded images in modern browser Local Storage with this jQuery plugin.
Set up get_image.php to return base64 encoded content from the server.
<li><img src="assets/test-image-1.jpg" class="imageCache" /></li>
<li><img src="assets/test-image-2.jpg" class="imageCache" /></li>
<li><img src="assets/test-image-4.jpg" class="imageCache" /></li>
<li><img src="assets/test-image-5.jpg" class="imageCache" /></li>
Or you can ommit the SRC attribute and store it in data-src, because some browseres still request the server to see if the image is not changed:
<li><img src="" data-src="assets/test-image-4.jpg" class="imageCache" /></li>
<li><img src="" data-src="assets/test-image-5.jpg" class="imageCache" /></li>
<script type="text/javascript">
Jump to Line
Something went wrong with that request. Please try again.