Love to hear the consideration for folks. I feel like I download twice that in javascript blobs from like 12 analytics companies and ad videos every time I visit e.g. CNN or TechCrunch
Love to hear the consideration for folks. I feel like I download twice that in javascript blobs from like 12 analytics companies and ad videos every time I visit e.g. CNN or TechCrunch
I regularly see sites with multi-hundred MB homepages with autoplay videos etc on mobile, where it is harder to uBlock your way out of all the garbage.
For example, you can "convert" an sRGB png to P3 (different colors result, but same bits) by doing nothing but tacking on the icc profile metadata from a P3 image.
Thank you. I will look into this
You might not even have to do anything config wise if this is for a website and normal web browsers.
If it’s for an app, it might depend on what client library you use but even then I guess a lot of them will automatically support that for you without any special configuration required.
I'll have to leave myself a comment in the conf file to remind me that I got a little tech support on a divergent bit of comments on a post about interesting CSS anims =)
Useful in case of bigger files (so you don't have to compress them on request), and also if you want to use a higher compression level: you're only going to compress them once, not on every request, so you can use a bit more CPU on making them a bit smaller.
--
0: https://httpd.apache.org/docs/2.4/mod/mod_deflate.html#precompressed
(I guess you're using Apache, but other servers can do it too)I would however definitely be interested in having the site's .js files delivered as .gz files. This has been something I have always been curious about and had as a TODO item, but I think this discussion will move it up on my priority list. Luckily, we are a very small site with a laughably small set of users. But nothing wrong with using best practices even so
I appreciate everyone's suggestions
You've got the important skill, asking questions and being willing to try, learn and get your hands a little bit dirty =)...
Then again, I'd say that for all of the other roles I've ever had. They were all self taught while learning on the job by learning from more experienced coworkers. I know enough to get something done, but I'd never have full faith that it would survive any kind of scrutiny other than it accomplished the task at hand.
"Oh we just need to include this lib for that one tiny thing, who cares."
Turns into
"we're using 7TB of mobile storage around the world for this one tiny feature"
or
"Our app is responsible for ~472TB of mobile storage being used."
(actual numbers I just calculated btw)
*: Some stuff is optimized out, not everything but essentially anything needed to run any part of the app on a users device is included, even if they just need to do one specific thing and nothing else.
The "just for one thing" also seems to be a common complaint about NPM as well. I'm sure any package/library managed ecosystem suffers this problem, but it really seems the Node gets tagged with it much more frequently.
IMO a lot of companies pinch pinnies on this internally ("focus on performance and app size, the app binary is huge!") while jumping over suitcases of cash ("yes, we absolutely need those 8 analytics libs driven by a json blob, of which we've only used one in the past year due to our contracts expiring 4 years ago").