Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Better Image Preloading With CSS3

Featured Replies

Hey Everyone!

 

I came across a great technique to preload multiple images with very little code and almost no markup. I tried it yesterday and it works great and so far I haven't found many downsides worth worrying about.

 

I'm sure many know about this but if not, here's the link/tutorial:

 

http://perishablepress.com/press/2010/01/04/preload-images-css3/

Credit Goes To Perishable Press for the idea.

 

Let me know what you guys think of this method? Maybe we can get some discussion brewing about the pro's and con's of this and other techniques. I think it's safe to say that Javascript is out (in most cases) and CSS is one of the quickest, easiest and most efficient ways of preloading multiple images. This just happens to be the best one for my project.

Thanks!

it doesn't work in all browsers so is, therefore, useless.

  • Author

it doesn't work in all browsers so is, therefore, useless.

 

According to W3schools.com it does in all newer browsers? Correct? In my case, I only have 1 image that truly needs to be preloaded so this works fine. In older browsers it will just revert back to the original image specified and the rest will be ignored. Either way, I think it's a fairly good idea and hopefully fully supported soon.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.