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,195
  • 62
  • 50
  • 120
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
  • 6,356
  • 6
  • 30
  • 49