Live data from Hacker News

Browsers are pretty good at loading pages

carter.sande.duodecima.technology

111–120 of 328 posts

Re: Browsers are pretty good at loading pages

#111

Earlier quoted context omitted.

> Because it's faster. The whole point of the article is that it's not true. It's not the only article that disproves it, and honestly, it's not difficult to notice it. Just go to any blog running off a static site generator; loading times of pure HTML webpages on good connection are so fast they whole thing outruns client-side page switches even if the page is already in memory.

Case in point, navigation on my site is pretty fast (to me, at least) and doesn't use much JS at all: https://www.stavros.io (I promise I'll reply to your email soon)

I'll admit it is pretty fast. Assuming you are using a mouse. But keyboard navigation is non-existent. So you have to ask yourself is it worth it to go against decades of effort put in to standard web navigation for what gain? Obviously only you can answer that for your blog. I'm not having a go.

But I will give you credit for the fact that it does work with Lynx!

Re: Browsers are pretty good at loading pages

#112
post #105
post #57

Earlier quoted context omitted.

Do you have an example of a site which does it well?

The blog of Svelte, the framework/compiler that was featured on HN some time ago works really well in my opinion: https://svelte.dev/blog

I don't know if their javascript is to blame, but I got this when I tried to use the back button: https://imgur.com/a/YcRtDFj

Re: Browsers are pretty good at loading pages

#113
post #11

It's the "app-like" experience that everyone is chasing. Loading a new page feels like browsing the internet. Single Page apps feel like a native app on your phone. At least that's what I think the reasoning behind the decision to go client side rendering is.

Nah, it doesn't "feel like" a native app. It feels like an incredibly fragile app-like porcelain on top of a webpage. A native app, a webview packed as an app and a website looking like an app are all easy to tell apart if you've used all three categories in the past and have at least little attention to details.

But yes, I can buy this is part of the reasoning. I think most of it is "we need to make SaaS; cool kids use React, so we'll use React too; now we have an SPA, so the easiest path is client-side navigation".

Re: Browsers are pretty good at loading pages

#114
post #111

Earlier quoted context omitted.

Case in point, navigation on my site is pretty fast (to me, at least) and doesn't use much JS at all: https://www.stavros.io (I promise I'll reply to your email soon)

I'll admit it is pretty fast. Assuming you are using a mouse. But keyboard navigation is non-existent. So you have to ask yourself is it worth it to go against decades of effort put in to standard web navigation for what gain? Obviously only you can answer that for your blog. I'm not having a go. But I will give you credit for the fact that it does work with Lynx!

By "keyboard" I assume you mean TAB-key-based navigation (I don't know of any other included in the browsers)? If so, it looks to me that links are in fact TAB-stops, but they're not being highlighted. It's something that should be solvable with a CSS adjustment.

Re: Browsers are pretty good at loading pages

#115

He lost me when he described Canada using a dictionary-like wording but also adding some pretty personal perspective. Describing an entire country as Socialist seems super opinionated to me. Client-side navigation is quite tricky to get right - since there is no definition of right. Browser back buttons and scroll positions between back and fourth page loads are not standards-based things and the only way to study th…

>Describing an entire country as Socialist seems super opinionated to me. Not to mention the fact he's wrong; contrary to popular belief, "socialism" has been described as many things but the simple fact of offering healthcare, market regulations and some amount of free Internet access(?) - Socialism is a mode of production in which means of production are operated and managed (and some would say "owned") collectivel…

I, uh, was kidding about Canada being a socialist state...

For what it's worth, I had a 128 kilobit connection in Canada because American T-Mobile plans give you one for free when you're outside the country.

Re: Browsers are pretty good at loading pages

#116

Earlier quoted context omitted.

> Because it's faster. The whole point of the article is that it's not true. It's not the only article that disproves it, and honestly, it's not difficult to notice it. Just go to any blog running off a static site generator; loading times of pure HTML webpages on good connection are so fast they whole thing outruns client-side page switches even if the page is already in memory.

Case in point, navigation on my site is pretty fast (to me, at least) and doesn't use much JS at all: https://www.stavros.io (I promise I'll reply to your email soon)

About as fast as mine on my underpowered machine, and mine is plain HTML without much attention paid to optimizing it further.

> (I promise I'll reply to your email soon)

(Take as much time as you need; also, I didn't expect a reply over the weekend :).)

Re: Browsers are pretty good at loading pages

#117
post #40

> A big one we’re seeing here is called progressive rendering: browsers download the top part of the page first, then show it on the screen while the rest of the page finishes downloading I question your reasoning here -- I don't think this is how progressive rendering works in browsers. The browser has to download the entire document to construct the DOM, and CSS in the head tag all has to be downloaded and parsed i…

> The browser has to download the entire document to construct the DOM Actually, the browser can construct the DOM for the first part of the page while it's waiting for the rest of it to download. Like, if the browser starts downloading a page and it sees this: My Cool Website Hello there ...it can add the element to the DOM, since no matter what comes after this in the HTML code, the will always be first on the page…

Do you know how contact the author? There's an issue with the CSS (it sets the background of the textarea to #fff, which is the same color as the text when the browser/OS uses a dark theme)

Re: Browsers are pretty good at loading pages

#118
It is not about speed, it is about code organisation and responsibilities. It makes sense to just transfer data between the server and the client and leave the client logic and rendering to the client while letting the server deal only with server stuff like authentication or fetching data from a database.

It might not be the best choice for a regular website with a bit of interactivity in some specific pages but if you create a web application, something like gmail for example, it makes much more sense even if it might be a bit slower. It basically separate it to an application and an API which most people find as a reasonable architecture rather than sending pages or fragments of pages between the client and the server.

Re: Browsers are pretty good at loading pages

#119

If you are thinking of things as "pages", this is of course true. I think a good example of a site that makes good use of this sort of thing is Wikipedia (the non-mobile version). I love that I can mouse over links and get more information on something, without having to click to its actual page. It pulls down only the information needed, and leaves everything else in place. This makes browsing far more efficient, at…

This feels more like the old "progressive enhancement" model than the full blown SPA style that's popular today. Most navigation on Wikipedia is plain old browsers loading HTML pages, but if you happen to support JavaScript, it's used to augment the page to make it a little easier to browse. (I don't actually know for sure whether Wikipedia pages are primarily server rendered, but what you describe is perfectly possi…

> I don't actually know for sure whether Wikipedia pages are primarily server rendered

Yes, Wikipedia works perfectly fine without Javascript

Re: Browsers are pretty good at loading pages

#120

The current generation of less-experienced developers tends to default to building every project in React, even if there's no tangible benefit to accepting this complexity. It's unpopular to express, but the truth is that many junior devs don't know how to do it any other way. I don't blame them for this, because they literally haven't been doing it long enough to have mastered multiple techniques. Managers go with i…

Reduces server costs. Able to process data on client, including mathematical computation via We ebAssembley. Which in effect allows you to create "Web Apps," rather than just a news site, blog, ecommerce, etc... figma.com is an excellent example.

Not to mention that SPA have been used for video game UI. Rather than building that system from the ground up.

If your client's needs are to just display a static and do not dynamic updates from the server then ignoring the SPA approach is very wise.

Client side navigation handled poorly is just that handled poorly. And should be handled by the Senior Developer and not the Junior. As SPA is just another tool for a specific use case.

Post reply on HN