5 ms·
This seems like the thing that we'd want cooperation with the browser vendors rather than everyone hacking together some JS to make it happen. If browsers could
by curun1r 10y ago
This seems like the thing that we'd want cooperation with the browser vendors rather than everyone hacking together some JS to make it happen. If browsers could expose the available bandwidth as a media query, it would be trivial to have different resources for different connections.
This would also handle the situation where the available bandwidth isn't indicative of whether the user wants the high-bandwidth experience. For example, if you're on a non-unlimited mobile plan, it doesn't take that long to load a 10mb image over 4G, but those 10mb chunks add up to overage charges pretty quickly, so the user may want to set his browser to report a lower bandwidth amount.
- rev_bird 10y ago>If browsers could expose the available bandwidth I don't know why this seems like such an imposition, but I think I'd be uncomfortable with my browser exposing information about my actual network if it didn't have to. I have a feeling way more people would be using this to track me than to considerately send me less data. That said, browser buy-in could be a huge help, if only to add a low-tech button saying, "request the low-fi version of everything if available." This would help mobile users too -- even if you have lots of bandwidth, maybe you want to conserve.
- Aeolun 10y agoI think if someone wants to track you, the bandwidth is not the first thing they'll be looking at. It's just another signal, but there's already a few tens of them, so adding one more is not going to make a significant difference.
- blixt 10y agoIf you consider every identifying piece of information as a bit in a fingerprint, it makes more than a significant difference; it makes an exponential difference. Consider the difference between 7 bits (128 uniques) and 8 bits (256 uniques) and then 15 bits (32K uniques) and 16 bits (65K uniques). Every additional bit makes a difference when fingerprinting a browser.
- dx034 10y agoIt doesn't have to be your actual bandwidth. The values could be (1) high quality/bandwidth, (2) low quality/bandwidth, (3) average. The browser can determine that automatically with an option to set it if you want to (e.g. for mobile connections). That should solve most problems without giving away too much information. But an extra button would probably just confuse people.
- abricot 10y agoThis sounds just like the idea that the website should be able to know how much power you had left on your device, so it could serve a lighter version of the webpage. I think the arguments against are pretty much the same.
- TeMPOraL 10y agoIndeed; as an user, I don't want the site to decide what quality to serve me based on probing my device. It'll only lead to the usual abuse. I want to specify I want a "lightweight" version or "full experience" version, and have the page deliver an appropriate one on demand.
- CaptSpify 10y agoI remember when websites used to have "[fast internet]" or "[slow internet]" buttons that you could use to choose if you wanted flash or not. Even though I had a high-speed, I chose slow because the site would load faster.
- Asooka 10y agoProgressive resources would help a lot here. We have progressive JPEGs and (I might be wrong) PNGs, you can set your UA to low-fi mode and it will only download the first layer of the JPEG.
- StavrosK 10y agoHere 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.lightentheweb.com/ http://www.lightentheweb.com/ It's not ready yet, but I'm adding links to smaller alternatives to popular frameworks, links to articles about making various parts of a website (frontend and backend) faster, and will possibly add articles by people (and me) directly on the site. If anyone has any suggestions, please open an issue or MR (the site is open source): https://gitlab.com/stavros/lighten-the-web/issues https://gitlab.com/stavros/lighten-the-web/issues
- TeMPOraL 10y agoThanks for the links to lightweight CSS and JS libs; I actually need exactly that right now for a project. Gitlab link is 500-ing, unfortunately.
- StavrosK 10y agoAh, oops :/ Seems to be okay now, let me know if there's something else you need! I'm looking for ideas on how to organize the docs/site at the moment.
- flukus 10y agoCan I suggest you add caching to the css, javascript and logo?
- StavrosK 10y agoI 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!
- niutech 10y agoYou can get the network type or downlink speed in Firefox and Chrome using NetworkInformation interface: https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation https://developer.mozilla.org/en-US/docs/Web/API/NetworkInfo... Then you can lazy load your assets depending on that condition.