0

Is there any way to cache images on load and use them from cache when they are needed.

I am using jQuery.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
ValRus
  • 119
  • 1
  • 1
  • 11

1 Answers1

1

you can cache (or pre-load) an image with javascript like this:

<script>
  img1= new Image();
  img1.src="yourimagefile.jpg";
</script>
Vickel
  • 7,879
  • 6
  • 35
  • 56