Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What browsers download hidden images

<style type="text/css">
    .hidden-image-container {
        display: none;
    }
</style>
<div class="hidden-image-container">
   <img src="lulcats.png" />
</div>

I'm mainly interested in what mobile browsers make the optimization of not downloading an image that's in a hidden container.

This would allow me to signficantly reduce initial download time.

Related reference question about loading images across devices

like image 976
Raynos Avatar asked Jan 23 '12 12:01

Raynos


People also ask

Do browsers load hidden images?

Even today (oct 2017), the most common browser Chrome will download all 'img' element sources, even if they're hidden. It won't download hidden background images.


1 Answers

Someone has tested this before:

http://www.w3.org/2009/03/image-display-none/test.php

Edit:
Looks like the list does not contain many mobile browsers (yet).

like image 192
user123444555621 Avatar answered Sep 28 '22 02:09

user123444555621