JS: Pre-Cache Image
How to pre-cache Images?
Like this:
(new Image()).src = "myphoto.jpg";
The Image
is a constructor that returns a HTMLImageElement
object, which represents the image element.
How to pre-cache Images?
Like this:
(new Image()).src = "myphoto.jpg";
The Image
is a constructor that returns a HTMLImageElement
object, which represents the image element.