Live data from Hacker News

Neither PWA nor AMP are needed to make a website load fast

tonsky.me

21–30 of 225 posts

Re: Neither PWA nor AMP are needed to make a website load fast

#21
post #13

The author says you can do these things anyway without AMP, but what he doesn't get is that web developers were not doing them. It took the nudge of AMP to get decent performance on the mobile web. He also failed to mention a key AMP rule: all CSS is in the head, a max of 50 KB. There is no external CSS at all. That's crucial. It reverses a persistent anti-pattern in web development that calls for a bunch of separate…

While everything you note is true, it's hardly the fault of the engineers. One cannot expect engineers to hand code css and optimize every time. These things should be handled by tools.

With the advent of css-in-js and compilers, this is slowly but surely happening.

What amp did was prove at scale, and with tooling, that performance can be achieved. That philosophy is dripping into other tools.

Re: Neither PWA nor AMP are needed to make a website load fast

#22
post #5

But you do need "PWA" if you want your site to work offline. PWAs were never really sold as something that would make your site's initial load time faster. Not really sure how the author got that impression. It's almost like saying "you don't need jQuery to make your site faster" - to those who understand the purpose of jQuery, it's a bit of a nonsensical statement.

Can't you just use ServiceWorkers in a regular webpage? Seems like you can. That would allow you to have an offline persistent website while still using a webpage. https://caniuse.com/#feat=serviceworkers

So the thing that makes a site a PWA in your eyes is the "add $app to your homescreen" prompt? Because I would view any site that works offline, beyond http/s caching, to be a PWA.

Re: Neither PWA nor AMP are needed to make a website load fast

#23
I agree on AMP, you can just pack less JS and be done with it. But AMP is REALLY about rich search results online.

Google creates more interactive search results for AMP pages than non-AMP versions.

As for PWA's, I'm honestly a fan, to a certain limit. I really like Gatsby.js, especially because the rendered pages work with Javascript disabled.

Django/Rails/$FRAMEWORK with Turbolinks.js is also great, for the same reason I like pwa's. If you aren't a fan of the JS ecosystem (totally fair), Turbolinks is a great way to get some ""snappyness".

Re: Neither PWA nor AMP are needed to make a website load fast

#24
post #14

Earlier quoted context omitted.

If, however, it's 15mb of useful functionality (perhaps an app that lets you edit and encode video), then in my eyes, it's acceptable You either have an abundance of high speed internet access, or benefit from internet usage that isn't metered by the amount of data consumed, or both. Functionality or not, heavy web experiences leave out a lot of people who would otherwise be willing and capable users of %product% if…

> but perhaps can't because they're downloading 15, 20, 30MB websites just to fill out a form element? Parent post (in fact, the segment you quoted) literally says that it's okay when it is useful functionality, i.e. not when it's just to fill out a form. Sadly, these aren't going to get to experience a decent chunk of the internet anyway, since video, gifs, and images all frequently weigh significantly more when put…

Parent post (in fact, the segment you quoted) literally says that it's okay when it is useful functionality, i.e. not when it's just to fill out a form.

Since when did forms become useless and what web-based video editor are you (or the original reply-er) pointing to that uses AMP?

Re: Neither PWA nor AMP are needed to make a website load fast

#25
post #3
post #2

Well yeah but the author is missing the point: these tools allow your site to load faster than the theoretical limit without them. AMP buys you Google's CDN and prefetching on Search. And PWA buys you a 0 distance cache hit on your second visit, the ability to prefetch unvisited resources, and with the ability to update the cache in the background. Not saying these aren't negligible on a 15MB site but they are tools…

Right, but why is your site 15MB anyway?

It's a client-side neural net?

Re: Neither PWA nor AMP are needed to make a website load fast

#26
post #5

But you do need "PWA" if you want your site to work offline. PWAs were never really sold as something that would make your site's initial load time faster. Not really sure how the author got that impression. It's almost like saying "you don't need jQuery to make your site faster" - to those who understand the purpose of jQuery, it's a bit of a nonsensical statement.

"Initial load time" means "download, install, and run time". With PWAs (just like native apps) the "download and install" part only happens once. The article is irrelevant to PWAs.

Re: Neither PWA nor AMP are needed to make a website load fast

#27
>I’m not saying practices promoted by AMP are bad or useless. They are good practices. But nothing stops you from following them in the regular web.

Disagree.

The most important feature of AMP is that it makes it impossible to add the kind of bloated crap that causes poor performance on something like a large media company website.

Something like a news website likely has 2-4+ analytics integrations, and a similar number of ad provider integrations.

Your staff want to use google analytics so that goes in. Your display ad provider (ads appearing in the page around articles) uses some other analytics provider so they have to go in. You want video ads so another ad provider who requires a video specific analytics provider goes in. Site rankings produced by someone or other are important to get direct ad sales so their required analytics integration goes in. Then someone in sales signs some deal to add a third party widget to your homepage so that goes in.

All of this happens over the protestations of the developers. People may literally quit over these integrations but their replacement will implement it.

Turn off your ad blocker, go to a news site, watch the network tab and despair.

AMP makes that crap near enough to impossible that the developers can convince the sales team and management that it simply cannot be done.

Re: Neither PWA nor AMP are needed to make a website load fast

#28
post #5

But you do need "PWA" if you want your site to work offline. PWAs were never really sold as something that would make your site's initial load time faster. Not really sure how the author got that impression. It's almost like saying "you don't need jQuery to make your site faster" - to those who understand the purpose of jQuery, it's a bit of a nonsensical statement.

Can't you just use ServiceWorkers in a regular webpage? Seems like you can. That would allow you to have an offline persistent website while still using a webpage. https://caniuse.com/#feat=serviceworkers

There seems to be a few misconceptions around what is and what isn't a PWA. A PWA (in my opinion) is simply a website that makes use of certain browser features (e.g. service workers, push notifications, manifests). It's a bad definition, with a lot of grey areas, but it is what it is (and let's face it, definitions in web development are often hard to pin down).

For example, we built https://usebx.com/app with plain old HTML, JavaScript and CSS. Yet, it can be installed on your phone, send you push notifications and even works offline. So I would categorise it as a PWA rather than a website.

My point is, if you're using service workers, you're more a PWA than a standard website.

Re: Neither PWA nor AMP are needed to make a website load fast

#29
post #8
post #4

Earlier quoted context omitted.

on a 15MB site Good lord, friend. Why put your users through this to begin with?

If it's just a website, then I agree that is indeed excessive. If, however, it's 15mb of useful functionality (perhaps an app that lets you edit and encode video), then in my eyes, it's acceptable, and probably a good candidate to be a PWA. I know a lot of people hate the idea of doing everything in the browser, but seriously, it's the one ubiquitous platform that we have, which even competing entities have agreed to…

> perhaps an app that lets you edit and encode video

Fundamentally, 15mb is excessive even for that, even if it is common practice for such things to bloat to that size.

Re: Neither PWA nor AMP are needed to make a website load fast

#30
I agree with the article author.

Performance today is not a priority for web developers. It's not even in the top ten priorities. Performance is just not considered unless it is so bad that a site looks like it isn't working.

We can change this at any point we like. We won't. It will continue to get worse.

Post reply on HN