3 ms·
I suspect there's not much to gain by caching images in the browser: If you're looking at a page full of comments with hundreds of avatars, chances are the next
by thamer 18y ago
I suspect there's not much to gain by caching images in the browser: If you're looking at a page full of comments with hundreds of avatars, chances are the next page is going to make you load hundreds more that you haven't seen already: There is a very large number of commenters, and you probably won't see the same people on every page.
The demo is right: they ask for 300 different images (as in, different URLs), and their packager makes it faster.
Also, how would you inline include images? Using base 64 in the image tag?
- aston 18y agoThe demo is pretty unfair. If you want to package lots of the same image, you just use it and let cache control do its job. If you want to package lots of different images, you should use a big sprite (again, server-side packaging without any js). If you want to make image loading look slow, do what they did in the demo.
- cakeface 18y agoThere are a bunch of images that can get repeated across pages for a web site that are completely vital to cache. Think rounded corner images or background images or icons.
- ncrovatti 18y agoLazy loading seems more efficient to me for this particular use.