Live data from Hacker News

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

tonsky.me

51–60 of 225 posts

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

#51
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…

50KB isn't hard to reach, because CSS rules are very repetative. Compressed, it shouldn't be 50KB, no.

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

#52
post #39

The footnotes mentioned: > By the way, since you first opened this article my ServiceWorker has downloaded XXX Mb of useless data in background. I hope you are on WiFi :) But the code doesn't really download anything. It stores the intial datetime your first load the page, and diff to the current time, convert it to "bytes" every second.

http://tonsky.me/sw.js: "Totally legit ServiceWorker ES6 implementation";

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

#53
post #49

Wikipedia is a static delivery website. Of course it’s easy if all you’re delivering is static content. Try that with an ecommerce site where dynamic information is sent from sometimes multiple sources. It’s better to load it once and have a reactive site call just the necessary apis after. Calling everything over and over again in eCommerce is a pain for users. Unless you can afford a database and servers to be dist…

> Wikipedia is a static delivery website. What do you think all those little "Edit" buttons all over wikipedia do?

Surely you must agree that Wikipedia is a more static site than, say, Facebook.

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

#54
post #9

It's not the hype that has publishers moving to AMP. It's not wanting to be dropped out of the carousel. Shame if somethin' were to happen to yer website traffic, friend.

Having worked for a publisher, it's definitely carousel FOMO. Some of it is the Google hype, but the carousel is 90% of it.

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

#55
AMP is embarrassingly buggy on iOS. The address bar doesn't hide properly, rotation breaks things, the "original link" often triggers the address bar, find highlighting is busted, and Reader Mode often fails.

AMP links are often slower than Reader Mode, because they're blocked on slow font loading.

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

#56
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.

Moreover..PWAs are not meant to replace websites. They are meant to replace Mobile Apps. Almost all business apps can be replaced by PWAs without the rigmarole of creating an app and publishing on Apple and Google store.

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

#57

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.

It's a shame since all hardware is getting slower and slower every day.

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

#58
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…

I think if more web developers understood how browsers actually render a page we'd get much better web pages. In the case of CSS, the browser won't render until all the CSS files are loaded and parsed. Having lots of them is terrible for time-to-first-paint performance. That's reason enough to inline styles in the head and only have one CSS link on a page if you want something simple, or to use media queries in links to create different contexts if you want to minimize download sizes.

CSS Wizardy (Harry Roberts) wrote a great article about this topic recently - https://csswizardry.com/2018/11/css-and-network-performance/

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

#59
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…

Eh, the 'trick' is to discard javascript. You can build a functional website without it.

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

#60
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…

To be fair, industry standard practices make it harder than it should be. We're making a very simple Vuejs app in our group (first one we've done in our group although we use Vuejs in other groups in our company). Our first stab out of the gate netted us nearly 500k of JS (production build, minified, etc) -- for something that basically takes a bunch of JSON and renders pretty tables.

Now, admittedly we've obviously done something horribly wrong, and the people on our team are senior enough programmers to accept that. However, if you're right out of a boot camp, or don't have a lot of confidence, then it might be something you overlook. If you've got a manager breathing down your neck saying, "It looks fine to me! Why are you wasting time trying to shave a few KB?", it can be hard to say, "Wait! This could potentially cost us customers". Having that conversation of "If we make the customer wait an extra second, they may walk away", is tough in the best of cases.

Ideally it would be very difficult to make as bad a mistake as we've made, but it really isn't. I suppose it gives us justification for larger salaries for experience :-)

Post reply on HN