4 ms·
If you truly worry about the performance of your webpage there are many, many places to optimize before ever considering the problematic CDN option. I suggest o
by atoav 2y ago
If you truly worry about the performance of your webpage there are many, many places to optimize before ever considering the problematic CDN option. I suggest optimizing everything else first. How many pages I have seen that load 3 fonts with 8 variants each while using one font with two variants is too damn high. The amount of people who don't know how to scale and compress images as well.
I know this is not how most sites operate these days, but consider that your visitor wants to visit you and getting your website. Whenever you embed stuff from other servers you not only gift away your user-data and breach their trust, you just doubled your attack surface and lowered the reliability of your site. And for what exactly?
My suspicion is that developers find it easier to paste a CDN include than downloading the file and including it themselves. Because performance my ass.
That's a bit like that cookie notice thing. Guess what: if you don't collect personal data and store it on your users computer, you don't need to ask them for consent and suddenly your site looks a lot cleaner and needs to deliver less data.
- satvikpendem 2y ago> I know this is not how most sites operate these days, but consider that your visitor wants to visit you and getting your website. Whenever you embed stuff from other servers you not only gift away your user-data and breach their trust, you just doubled your attack surface and lowered the reliability of your site. And for what exactly? The vast majority of people do not care nor even think about this. They might instead for example find it useful to see Twitter embeds right inline of the page rather than load the site externally.
- rererereferred 2y ago> find it useful to see Twitter embeds right inline of the page rather than load the site externally. I find it useful, but I find it even more useful when the tweet content is copied to the site instead of embedded because it's still there when the tweet is deleted or Elon decides it's not profitable to allow embedding tweets.
- atoav 2y agoMost people I know complained at one point or another about convoluted consent popups and slow pages. Sure they don't know the details, but they know it sucks.
- SahAssar 2y ago> How many pages I have seen that load 3 fonts with 8 variants each while using one font with two variants is too damn high. If a font is not used at all it is not loaded, that's why subsetting and loading with unicode-range works as an optimization. I definitely agree that you should not use a these public CDNs though.
- paulddraper 2y agoMany will obsess over JS sizes. But one image can easily exceed it.
- autoexec 2y agoThat one image is probably far more useful to the person loading the webpage than the hundreds of MBs of JS. It's best to reduce the size of images, but even doing that everywhere won't make the bloat of mostly useless JS any better.
- tacone 2y ago> If you truly worry about the performance of your webpage there are many, many places to optimize before ever considering the problematic CDN option. Well, no. Loading just one file from an external domain (CD or not) equals one additional DNS resolution (and SSL handshake), equals a lot of wasted time, often blocking. Self hosting scripts, css and fonts would be one the very first things I'd do.