3 ms·
Hi, author here. I wanted to measure visual information content of a page, and yes, PNG is maybe not the best to do that. JPEGs are smaller, but it introduces
by ZeljkoS 10y ago
Hi, author here.
I wanted to measure visual information content of a page, and yes, PNG is maybe not the best to do that. JPEGs are smaller, but it introduces another problem of visible artifacts around text.
If anybody knows a better way to measure visual information content, please suggest.
- idlewords 10y agoI don't have a suggestion, but I wanted to congratulate you on a wonderful idea, really nicely executed.
- ZeljkoS 10y agoThanks Maciej, your obesity article was a one of the sources of inspiration :)
- hyperpape 10y agoI don't have a worked out idea, but maybe if a site has more than a certain amount of images, start to multiply their contribution to the size of the page? So if you double the image content, then a page that literally takes 10 MB to load, of which 9.5 MB are images has the calculation: 19.5 / 10 = 1.95. (assuming the PNG is 10 MB for simplicity). You could be fancy and use exponent. But I doubt there's a good mechanical way to do this. Whether an image is bloat or valuable content requires sophisticated judgment and understanding of what the purpose of the page is.
- ZeljkoS 10y ago> Whether an image is bloat or valuable content requires sophisticated judgment and understanding of what the purpose of the page is. I completely agree with that. Quick check is to replace all images on a page with placeholder images—if that doesn't reduce functionality of the page then maybe you don't need that images at all.
- michaelmior 10y agoWhy are visible artifacts around text a problem? The screenshots are just being used to calculate the metric. Is it really important what they look like?
- ZeljkoS 10y agoThere is some truth to that, but I wanted screenshots to be visible for comparison and to have the same visual functionality. Artifacts around text make it hard to read, thus less functional.
- Filligree 10y agoWell, you wouldn't be showing the JPEGs to anyone. Using JPEG compression for the calculation might be perfectly fine. By the way, your calculator seems to include prefetched pages in the calculation. (link rel="prefetch".) Not sure if that's deliberate or not.
- ZeljkoS 10y agoYes, prefetch is deliberate as that is the default behavior of SlimmerJS and most of the browsers.
- gsylvie 10y agoHow do you measure "TotalPageSize"? Does it take into consideration any plain-text content that's served with "Content-Encoding:gzip"?
- ZeljkoS 10y agoFrom my developer: "We measure every request that was received by SlimerJS, also for any request that sends a resource as GZIP, but does not specify its size, we will GZIP that content ourselves in order to get its size."