Live data from Hacker News

The web sucks if you have a slow connection

danluu.com

581–590 of 622 posts

Re: The web sucks if you have a slow connection

#581
Quora is unusable on a slow connection. It literally shows a popup that obscures content if you lose high speed connectivity or drop packets.

However, the web is even worse if you have no connection at all. This is important because if we provide internet access at a municipal level, we can reach 100% adoption among our pluralistic educational system and progress to primary learning materials that are web based (CA 60119 for example prohibits any primary educational materials not available to all students both in the classroom AND AT HOME).

Re: The web sucks if you have a slow connection

#582

Something I have had at the back of my mind for a long time: in 2017, what's the correct way to present optional resources that will improve the experience of users on fast/uncapped connections, but that user agents on slow/capped connections can safely ignore? Like hi-res hero images, or video backgrounds, etc. Every time a similar question is posed on HN, someone says "If the assets aren't needed, don't serve them…

I don't think there is an easy way to tell the browser not to download something because the connection is slow. Progressive enhancement can work well for giving users a basic page that loads quickly with minimal assets while also downloading heavier content in the background that renders later. That's still different than putting a timer on a request to download the content (which would require JS to detect the slow connection).

If you make a page well it should render quickly under any network condition, slow or fast. As an example, you could try serving pictures quickly by providing a placeholder picture which uses lossy compression to be as small as possible. It could be byte64 encoded so it's served immediately even over a slow connection. Then after the page is rendered, a request could go out to download the 0.5Mb image and a CSS transition could fade the image in over the placeholder. People on fast connections wouldn't notice a change because it would load right away, while people on a 40kbit 2G connection would be OK with your page too.

The requests to download larger content will still go out over a slow connection but the user won't suffer having to sit through seconds of rendering. Maybe similar to how people have done mobile-first responsive design, people could try doing slow-first design. Get everything out of the critical rendering path and progressively enhance the page later.

Re: The web sucks if you have a slow connection

#583
post #570

Earlier quoted context omitted.

Can I suggest you add caching to the css, javascript and logo?

I will, it's still early so I hadn't taken a look. To be honest, since this is hosted on Netlify I was kind of assuming they'd be sending caching headers for all static files, but I see that they aren't. I'll look into it, thank you! EDIT: Netlify would be setting everything properly if I hadn't turned that off... Luckily they have great support!

Whole things super fast now, loads in 55ms. I assume most of that is ping (I'm in Australia).

Re: The web sucks if you have a slow connection

#584

Earlier quoted context omitted.

Open connections take system resources. One way to DOS a website is to open a ton of connections and just sit on them. If the server allows extra long timeouts as long as some bits come in occasionally, then the attacker can send bits occasionally. It's a tricky problem. It might work to allow long turnouts as long as you don't have an ongoing DOS attack, but that sort of thing is hard to configure and test.

After Slowloris and other attacks, this is pretty much a solved problem. Minimise per connection memory, limit connections per IP, drop connections which don't finish the request in X seconds, and separate your app server from your front proxy. And for the front proxy, don't block on reads - do minimal event loop until you can dispatch the full request.

One person's "Solved Problem" is another person's "I just built an app in rails that accomplishes what I want it to, why did it stop working?"

Re: The web sucks if you have a slow connection

#585
post #474
post #344

Earlier quoted context omitted.

Wow, uncanny resemblance to Giffen goods: https://en.wikipedia.org/wiki/Giffen_good

From the wikipedia article I gather that the only Giffen goods that were actually shown to exist are the Veblen goods and thus disqualify as Giffen goods. It seems to me that Giffen goods are a theoretical thing that has never been actually shown in real world (as the article states, all of the proposed examples were discarded). The case of website cost going down and demand going up seems pretty standard.

Giffen goods are likely to exist only in communities of extreme poverty, where the cheapest things you buy dominate your spending. That's why it was only found in an experiment performed on people living on subsistence:

https://en.wikipedia.org/wiki/Giffen_good#cite_note-4

I bet you could find it in some video game economies.

Re: The web sucks if you have a slow connection

#586

I found out this the hard way. T-Mobile used to offer 2G internet speeds internationally in 100+ countries included in Simple Choice subscriptions. 2G is limited to 50 kbit/s, that's slower than a 56K modem. While this absolutely fine for background processes (e.g. notifications) and even checking your email, most websites never loaded at these speeds. Resources would time out, and the adverts alone could easily exce…

FYI, I had the same connection and I'm pretty sure T-Mobile simulates 2G by switching 3G on and off to get the correct speed on average. Breaks a lot of stuff. Almost unusable!

Re: The web sucks if you have a slow connection

#587

Something I have had at the back of my mind for a long time: in 2017, what's the correct way to present optional resources that will improve the experience of users on fast/uncapped connections, but that user agents on slow/capped connections can safely ignore? Like hi-res hero images, or video backgrounds, etc. Every time a similar question is posed on HN, someone says "If the assets aren't needed, don't serve them…

In the ideal future, FLIF [0] would become a standard, universally supported image and animation format. Almost any subset of a FLIF file is a valid, lower-resolution FLIF file. This would allow the browser - or the user - to determine how much data could be downloaded, and to display the best-quality images possible with that data. If more bandwidth or time became available, more of the image could be downloaded. The server would only have one asset per image. Nice and simple.

[0] http://flif.info/

Re: The web sucks if you have a slow connection

#588
> In the U.S., AOL alone had over 2 million dialup users in 2015.

I've seen this figure a few times before, and I wonder every time who these users are. Specifically I'm curious what the breakdown is between people who

- Really don't have a better option available (infrastructure in this country is unbelievably bad in some places, so I wouldn't be surprised at a large size for this group)

- Are perfectly happy with the dialup experience so they don't switch to something better

- Don't know there are better options so they stay with dialup

- Don't even realize they never cancelled AOL and are still having it auto-debited every month

- Some other option I didn't think of

Re: The web sucks if you have a slow connection

#589
post #583

Earlier quoted context omitted.

I will, it's still early so I hadn't taken a look. To be honest, since this is hosted on Netlify I was kind of assuming they'd be sending caching headers for all static files, but I see that they aren't. I'll look into it, thank you! EDIT: Netlify would be setting everything properly if I hadn't turned that off... Luckily they have great support!

Whole things super fast now, loads in 55ms. I assume most of that is ping (I'm in Australia).

Fantastic, thanks!

Re: The web sucks if you have a slow connection

#590
post #576

Earlier quoted context omitted.

Here in Greece, the internet is plenty fast (in bandwidth), but everything is far away, so there's lots of latency in opening every page. Going to the US on a trip, it's striking how much faster every website loads, there's no 300ms pause at the start anywhere. Because I got frustrated at fat websites downloading megabytes of useless things, I decided to start an informational site about this very thing: http://www.l…

Very interesting. I would suggest swapping the current structural aesthetic of "come in and look around" for the somewhat more widespread approach of having one or more calls to action and making the homepage fully sketch out the points you want to make. FWIW, I say this out of pragmaticness. I don't mind the "welcome! browse!" approach myself, but it won't appeal to the demographic you're trying to reach: people who…

It's funny that you mention that, because I just wanted to have a site I could optimize to hell, and it seemed apt to make an informational site about optimization for that . AppCache is obsolete and harmful now (yes, already), and I should link to the articles that talk about that, thanks for reminding me.

As for the "come browse" approach, you're definitely right, and I don't intend the finished site to look like this, but I'm also not sure how to structure the content. What do I send the user to first? Maybe I'll write a tutorial hitting all the bullet points with links, though (eg add caching to static media, bundle them, don't use heavy libraries, load js async if you can, etc etc).

Thank you very much for your feedback!

Post reply on HN