News for hackers. Stuff that matters.
Re:I am a fast webpage by cperciva on Wednesday September 07, 2016 @06:39PM (#12448571)
You forgot the most important factor: Whether you're reusing that image on a different page. Embedding images in the HTML is basically saving an HTTP request at the expense of not being able to cache the image separately from the HTML.
Re:I am a fast webpage by 33degrees on Wednesday September 07, 2016 @06:47PM (#12448636)
You can, however, embed images in CSS, which gives you both reduced requests and caching.
Re:I am a fast webpage by mikekchar on Wednesday September 07, 2016 @08:37PM (#12449294)
Unless you inline the CSS ;-)
Re:I am a fast webpage by rocky1138 on Wednesday September 07, 2016 @08:11PM (#12449158)
This seems like it should work, but have you ever tried it? Or, can you point me to some results of a test to show that it indeed caches the image embedded in the CSS?
Re:I am a fast webpage by paulddraper on Wednesday September 07, 2016 @09:23PM (#12449500)
If it's inline, then it's cached with whatever it's inlined into.
Re:I am a fast webpage by echeese on Thursday September 08, 2016 @05:04PM (#12457327)
The problem is that now it's going to be sent with every request. So it'll make the first page faster for the initial request, but slower in the long run.
Re:I am a fast webpage by 33degrees on Sunday September 11, 2016 @09:59AM (#12473368)
I'm not sure how you figure that? The CSS file containing inline images would get cached, so nothing would be sent after the initial request.
Re:I am a fast webpage by dorfsmay on Wednesday September 07, 2016 @06:51PM (#12448677)
Exactly! On a typical site, a lot of images are reused across pages, if externalised then it's already cached in your browser.