Skip to content

Instantly share code, notes, and snippets.

@quawn
Last active December 28, 2015 03:09
Show Gist options
  • Save quawn/7432722 to your computer and use it in GitHub Desktop.
Save quawn/7432722 to your computer and use it in GitHub Desktop.
HTML: No-JS Image preloading
<!-- ADD THIS TO XHTML -->
<div id="preloaded-images">
<img src="http://perishablepress.com/image-01.png" width="1" height="1" alt="Image 01" />
<img src="http://perishablepress.com/image-02.png" width="1" height="1" alt="Image 02" />
<img src="http://perishablepress.com/image-03.png" width="1" height="1" alt="Image 03" />
</div>
div#preloaded-images {
position: absolute;
overflow: hidden;
left: -9999px;
top: -9999px;
height: 1px;
width: 1px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment