I get an excellent PageSpeed score by hosting my own stuff on Azure. CDNs make sense only for sites with huge traffic. And at that point, maybe you could afford to pay for extra bandwidth and still not use a CDN. And I've mostly stopped using PageSpeed at all, because the metrics are obvious: total download size matters.
All the arguments for "but your user might already have such-and-such-version-of-jQuery cached" just have not had a good enough impact on total experience. There are so many versions of whatever you might be importing, and HTTP keep-alive works really, really well.
Of course, I also don't have any tracking setup, say nothing of the 50 dozen systems most sites use. I've never gotten anything out of them that I couldn't have figured out on my own. They always come back to "users bounce when shit is slow". Thanks, tracking scripts, for contributing to my bounce-rate.
So there you go, do you want to create a good user experience, or do you want to sell your users out for a pittance?
Have your first user experience in your site be super optimized. Static HTML. Host all assets on your own. Size images correctly. Minimize, then inline the CSS and JS. There are plenty of design-time scripts to automate it. And if you're making SPAs, you can implement all the dynamic loading you want past the initial page because users clicking to open your app are already engaged. But get that first page on-screen in less than a second on a 2G network.
Comments
I get an excellent PageSpeed score by hosting my own stuff on Azure. CDNs make sense only for sites with huge traffic. And at that point, maybe you could afford to pay for extra bandwidth and still not use a CDN. And I've mostly stopped using PageSpeed at all, because the metrics are obvious: total download size matters.
All the arguments for "but your user might already have such-and-such-version-of-jQuery cached" just have not had a good enough impact on total experience. There are so many versions of whatever you might be importing, and HTTP keep-alive works really, really well.
Of course, I also don't have any tracking setup, say nothing of the 50 dozen systems most sites use. I've never gotten anything out of them that I couldn't have figured out on my own. They always come back to "users bounce when shit is slow". Thanks, tracking scripts, for contributing to my bounce-rate.
So there you go, do you want to create a good user experience, or do you want to sell your users out for a pittance?
Have your first user experience in your site be super optimized. Static HTML. Host all assets on your own. Size images correctly. Minimize, then inline the CSS and JS. There are plenty of design-time scripts to automate it. And if you're making SPAs, you can implement all the dynamic loading you want past the initial page because users clicking to open your app are already engaged. But get that first page on-screen in less than a second on a 2G network.