
Things you can do with a browser in 2020 - therealmarv
https://github.com/luruke/browser-2020
======
rkagerer
As a user, so many of these I wish did NOT exist. E.g: Push Notifications,
Banners, Web Share, Contacts, Page Visibility, Badging.

Uncertain about USB, Bluetooth, Locks, Keyboard Lock, and Native File System.

I don't _want_ my browser doing those things.

~~~
untog
Then you're out of step with what users want these days.

Nothing wrong with that! But to take an example, when I hit a share button on
a page I want to see the native share box, not some hideous iframed
monstrosity that only works with Facebook. So I want Web Share. And I don't
want to download an entire native app just so that I can receive a push alert
when my food order is on the way, a web site works much better for that. So
I'm happy that Web Push exists.

I get the nostalgia for the "simpler days", but web browers are essentially a
universal OS these days. As both a user and a developer I'm quite happy with
this.

~~~
taeric
I prefer copying the link to the page I'm on to share. No popups, native or
otherwise.

Similarly, I like not having an app running so that you could just send me a
text. Sms is bad for security, but great see sending short notifications.
Almost better, as it is so limited.

~~~
jakub_g
FYI on Chrome/Brave Android, when you use 'share' button -> copy URL, it uses
link rel=canonical meta tag if available (which generally doesn't have all FB
tracking crap in the URL etc.)

Much better than directly copying the URL.

~~~
hoseja
Or you could just trim the URL yourself.

~~~
innocenat
Which is a behaviour I observed in most power users, but none in the non-power
user group.

I don't think most non-power user even want to try to trim that stuff, because
they don't know what can be trimmed and what can't.

~~~
jakub_g
Yep unfortunately true. I recently saw an official document from local CDC in
my home country. There were two URLs "find more info at" in the document:

file:///C:/Users/blabla/something.pdf

httpx://who.int/something?fbclid=<200-hundred-chars>

------
geofft
A few things that aren't mentioned:

\- Web MIDI - access digital keyboards/synthesizers. I believe in some
browsers there's no prompt, unlike Web USB.

\- Screen sharing via getDisplayMedia, analogous to getUserMedia for cameras.

\- WebRTC, peer-to-peer connections.

\- Security keys (WebAuthn), specific support for cheap ($10-$50 depending on
features) devices that do second-factor login to websites. Importantly, these
devices communicate with the browser about which site you're logging into,
making for phishing-proof logins.

~~~
choward
Is WebRTC really peer-to-peer if you need a server?

~~~
kodablah
A while back I wrote a screen sharer that uses WebRTC and Gun.js for signaling
[0]. Nowadays you could use IPFS's JS lib to do this (or webtorrent even). Now
if both people are behind a restrictive NAT or something, you do need a TURN
server.

0 - [https://myscreen.live](https://myscreen.live)

------
_bxg1
Worth noting is that "prefers-color-scheme" works in _all_ major OSes at this
point, mobile and desktop. If your site already has a dark theme, there is no
reason at all not to be integrating it this way.

Even if you don't have a dark theme already, it's a huge value-add.....
(@dang?)

~~~
gwern
Yes, it's such an obscure feature that many of the people who enable it don't
even realize it... Ever since I added dark mode to gwern.net, I've been
getting or seeing complaints about how my website is broken or 'defaults to
black-on-white' (it doesn't). :(

~~~
chrfrasco
Looks like we need prefers-prefers-color-scheme

~~~
gwern
But then what happens when they forget opting into the opting in?!

~~~
gwern
In all seriousness, because people keep not realizing or forgetting, we're
adding a 'theme switcher' little widget. I dislike the need, but lots of
people genuinely like dark mode, and this seems to be the best compromise.

------
vortico
This list doesn't include the Screen Capture API.

[https://www.w3.org/TR/screen-capture/](https://www.w3.org/TR/screen-capture/)

[https://developer.mozilla.org/en-
US/docs/Web/API/Screen_Capt...](https://developer.mozilla.org/en-
US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture)

[https://www.webrtc-experiment.com/getDisplayMedia/](https://www.webrtc-
experiment.com/getDisplayMedia/)

------
shp0ngle
> Browsers can register push notifications

Oh yes I didn't notice EVERY PAGE on the planet asking me for that.

(After asking me for e-mail newsletter signup and cookie consent.)

~~~
equalsione
Firfox recently changed this so that you have it can only be invoked from
within a button click or equivalent event[0] - I _think_ Chrome is following
suit.

0 - [https://developer.mozilla.org/en-
US/docs/Web/API/Push_API](https://developer.mozilla.org/en-
US/docs/Web/API/Push_API)

~~~
Spivak
Yeah, and this works somewhat but sites just listen for the events on every
element and trigger the popup then.

------
antibland
For anyone wondering how well supported these features are globally (from
caniuse):

prefers-color-scheme: 80.85%

prefers-reduced-motion: 84.05%

Payment Request API: 90.06%

Web Share API: 49.25%

Push API: 78.57%

Service Workers: 94.42%

Web/native app install banners: 68.19%

Get Installed Related Apps API: Not launched, 0%

WebXR: 61.83%

Picture-in-Picture: 85.01%

Media Session API: 66.31%

Chrome Sender API: 64.75%

AirPlay: Unknown

Force Touch API: 55.74%

AR Quick Look: Unknown

GamePad API: 95.18%

WebUSB API: 65.27%

Web Bluetooth API: 68.6%

Web Locks API: 67.43%

Keyboard Lock: 30.47%

Generic Sensor API: 67.43%

Credential Management API: 70.86%

Clipboard API: 70.86%

Presentation API: 15.24% full support, 80.14% partial

Screen Orientation API: 76.16%

getUserMedia camera selection: 93.48%

Pointer Lock (Mouse Lock): 55.06%

Theme Color: 37.39%

Vibration API: 77.13%

Web Coffee API: Unknown

Battery Status API: 72.36%

Page Visibility API: 97.44%

Web Speech API: 92.88%

~~~
ficklepickle
The web coffee API is a troll FYI. There is no covfefe protocol.

------
raygull
I had no idea the Web Coffee API was so mature.

~~~
drivingmenuts
Why is this even an API?

Seems like a joke API rather than something actually useful.

~~~
anchpop
Go click the link in the github repo, it's actually very cool

------
beagle3
... and Safari still holding out on web push - this lack is a reason many
native apps get written.

~~~
dijit
I’m not sure why I read this in a negative tone, this is fantastic.

~~~
beagle3
I'm not sure about other browsers, but Firefox asks once per website that
wants a push, and even that can be turned off.

What's fantastic about not even having the option? What's fantastic about
having to pay $100/year or reinstall your apps once a week, in addition to
having Apple MITM any notifications?

~~~
Spivak
Battery life is the main reason for this it seems. It's not about "having the
option" it's "if you give devs the option they will use it leading to an
overall worse experience." Web push notifications can't possibly leverage the
single low-power TCP connection that iOS (and Android with gplay) devices keep
open.

Push notifications in the way that phones do it are necessarily platform and
service specific.

You don't have to allow Apple to MITM your push notifications BTW. Just send a
generic ping to your app, and when it wakes up pull the actual content from
your server and display the notification.

------
init0
[https://whatwebcando.today](https://whatwebcando.today)

------
dzonga
browsers are truly a universal too and a great equalizer. not only do they
enable open platforms, away from the walled gardens. they also provide a way
to share software for 94% majority. But alas, people these days are fighting
against browsers. heck a good portion of web developers out there don't know
semantic html or what good it can do. they were raised in the SPA era. view
source is now foreign to most people. or that html pages are automatically
cached for offline is foreign to most people too. what a sad state of affairs.

------
uk_programmer
This is a great list some of these APIs look pretty interesting and didn't
know about them this is a great list.

Push notifications are becoming an irritation mainly because of their overuse.
The number of sites where you go to them to have a look at one piece of
information and you have to tell them no to push notifications is becoming
quite an annoyance.

~~~
ocdtrekkie
This was an example of where web developers really should've known better in
advance. They literally coded an intentional new way for people to make popup
ads, and it's the primary use of the web notifications API.

I regularly hear of complaints about spammy popups on people's computers, even
when they don't "have the web browser open". And it turns out it's just stock
Google Chrome, doing exactly what Google Chrome was designed to do: Pop up
ads, that everyone has since started shipping ads through.

~~~
uk_programmer
I believe Brave has them disabled by default or an option for it. It is a
shame a good feature has been abused, but yes you are right it is to be
expected.

------
simonw
Suggestion: add a rough indicator of what platforms support each feature. You
could link to the relevant page on
[https://caniuse.com/](https://caniuse.com/) but even a very quick "Supported:
Mobile Safari, Chrome on Desktop" sentence next to each one would be
enormously useful.

~~~
_bxg1
Each link already goes to MDN, which has its own rough chart of browser
support

~~~
nixpulvis
I clicked the Web Credentials link, and was disappointed to be redirected to
google's docs :P

[https://developer.mozilla.org/en-
US/docs/Web/API/Credential_...](https://developer.mozilla.org/en-
US/docs/Web/API/Credential_Management_API)

~~~
_bxg1
Ah. Well at least some of them go to MDN...

------
GrazeMor
The credential management api is super annoying. Many websites now have a very
annoying sign in with google dialog whenever I visit them and there's no way I
can find to disable it.

~~~
josh3736
The Credential Management API is more like a API in to the browser's password
manager. A page can save a username/password/token into secure storage (which
the browser can sync to your other devices) and later retrieve it. This is
nice because we don't have to rely on autofilling form field heuristics.

You're thinking of Google's One Tap, which is just a JS snippet that
publishers include on their page, and has nothing to do with browser APIs.
(The OP shows a screenshot of One Tap, which is confusing.)

These uBlock filters will make those sign up with Google popups go away
entirely:

    
    
      ||accounts.google.com/gsi/iframe/select?*ux_mode=popup$all
      ||smartlock.google.com

------
morninglight
Some people want a laptop that can make waffles, wash and iron clothes, vacuum
the carpet, paint walls, repair blacktop and work as a vibrator.

My needs are simple. I want a small, rock-solid, terminal that is dedicated to
HIGHLY secure and federally guaranteed transactions on a publicly funded
military grade network for: Banking, Bill Payment, Tax payments, Voting.

I do not want it to take photos, listen to me, show advertisments, play games,
stream media, maps, start coffee machines, do email and chat, play audio/video
files, draw graphics or change themes.

And any "browser" that can do these additional functions should be banned from
connecting to the high security network under penalty of death.

Very simple.

------
oliv__
Why should a browser be allowed to check for device battery life? That seems
wayyy off limits

~~~
jtvjan
It has been deprecated because of privacy concerns, so it will probably be
removed from browsers soon.

------
dredmorbius
This article needs a complement: Things you can't do with a browser in 2020.

------
angelbroz
Picture-in-Picture works great for Facebook videos, FB stops playing videos
when the window is not focused, so this feature it's amazing :D

~~~
anoncake
It's a hack that shouldn't even be necessary. It's none of FB's business
whether its window is focussed.

~~~
Elv13
In AwesomeWM (a linux window manager), we have APIs to lie to windows. Telling
youtube it is in fullscreen mode when it isn't is very useful. A lot of
websites have much better fullscreen / mobile modes.

(disclaimer, I am one of the dev)

------
fuzzfactor
Mount and Unmount a VHD File in Windows Explorer via a Right-Click

[https://www.howtogeek.com/51174/mount-and-unmount-a-vhd-
file...](https://www.howtogeek.com/51174/mount-and-unmount-a-vhd-file-in-
windows-explorer-via-a-right-click/)

------
TheBobinator
What seperates psychological warfare from marketing?

If you pay attention to advertising for a week, you will be marginally
educated on what the advertiser wants you to know about their products and
services; this has some economic utility as you cannot buy what you don't know
exists.

If you pay attention to psychological warfare for a week, first off you at
bare minimum will not be happy or content as you are not buying if you are
content or happy; they must torture you through mechanisms of persuation and
manipulation in order to manufacture a desire. Once that is done, then they
try to train you to have desirable habits to them; as a famous example
McDonalds happy meals for kids creating obese adult customers 30 years later.
If the food didn't have a serious downside (didn't literally injure you and
make you depressed) you wouldn't come back to the restaraunt later for your
momentary allevation of that depression\for a fix.

Now, Go try to find reliable information on Coronavirus. Which one of those is
going on 99% of the time? The sales funnel is really training you to be the
product for them.

The web is funded by marketers who engage in pyschological warfare for profit,
no feature they will ever impliment is designed to make you happy, and
technologists have tremendous profit motive to make up all sorts of excuses as
to why this behaivour is acceptable when clearly it is destructive to both
themselves and the web.

Browsers today are trying to become an operarting system so they have absolute
conrtrol over the user experience and as they do that they are on a slow march
towards building an unbelievably bloated application who's philosophy is to
confuse, distract, and screw you at every turn all while managing your
perception.

Case in point, it would take hours for me to research how to turn off all of
those features as I don't need them and there's no mechanism in Firefox or
Chrome to backup settings which those browsers reset randomly and
intentionally.

So call these things what they are; at best, bloat, at worst, a stock pump and
dump scheme combined with a tremendous waste of time.

------
jan6
I'm rather sad that for example Battery API is deprecated... possibly might
need a browser-wide toggle, but still... It can both be cool, and
useful....mostly cool, though... you could have a complete web desktop (there
several web desktops, and even more "fake" ones, like windows93) that shows
the status, or a webpage that switches to dark mode with minimal javascript
and theming, when battery is low, or a low distraction writing environment for
example, that still notifies you of low battery, etc... more and more people
are using battery-powered devices ;)

~~~
saagarjha
> a webpage that switches to dark mode with minimal javascript and theming,
> when battery is low

Please don't arbitrarily change the theme of the website I'm using based on my
battery level.

> a low distraction writing environment for example, that still notifies you
> of low battery

My system does this.

~~~
TheCoelacanth
> Please don't arbitrarily change the theme of the website I'm using based on
> my battery level.

Yeah, just base your theme off of the dark mode setting. Then if the _system_
changes to dark mode when battery is low, your app can follow suite.

------
nexuist
I really, really, really wish iOS allowed push notifications through Safari.
So many PWA ideas I want to explore are instantly stifled by that omission.

~~~
paulcarroty
Is there no alternative way?

~~~
nexuist
You can ask your users to download a third party app like PushBullet, but
that's very lame and unprofessional.

------
marczellm
More like a "things Chrome can do in 2020".

~~~
snazz
Nearly all of these are supported by Firefox as well. Apple is slower at
implementing Safari features, but most of the important ones work (prefers-
color-scheme, for example).

------
jessaustin
I like the Intersection Observer:

[https://developer.mozilla.org/en-
US/docs/Web/API/Intersectio...](https://developer.mozilla.org/en-
US/docs/Web/API/Intersection_Observer_API)

------
neillyons
I fell for the coffee API It was half believable because of the teapot statue
code.

------
Wingy
Of course this one goes where you'd expect...
[https://github.com/luruke/browser-2020#web-coffee-
api](https://github.com/luruke/browser-2020#web-coffee-api)

------
ForHackernews
See also, from yesterday: "The reckless, infinite scope of web browsers"

[https://news.ycombinator.com/item?id=22615894](https://news.ycombinator.com/item?id=22615894)

------
Nextgrid
I am concerned that the "dark mode" and "reduce motion" detection features can
be used for browser & OS fingerprinting. Does anyone know if any
countermeasures are in place against that?

~~~
saagarjha
I think prefers-color-scheme was actually held up for a while due to
fingerprinting concerns.

------
wubin
Additionally, here is a list of what browsers _will_ be able to do:

[https://goo.gle/fugu-api-tracker](https://goo.gle/fugu-api-tracker)

------
cdbattags
So, uh, [https://github.com/luruke/browser-2020#web-coffee-
api](https://github.com/luruke/browser-2020#web-coffee-api)

------
fortran77
I think WebUSB is all but dead. See:
[https://news.ycombinator.com/item?id=22228879](https://news.ycombinator.com/item?id=22228879)

~~~
schappim
It is very much not dead and is used for educational products all the time.

We use it ourselves for our internal ecommerce backend system.

We made our own WebUSB Postage Scales and Label Printer that enables 1-click
creation of consignment labels.

We pull weights from the postage scales and chuck raw ZPL over the wire to the
Label Printer.

Being able to skip the bugs in operating system printing queues is amazing.

Demo:

[https://vimeo.com/334547755/c387957a25](https://vimeo.com/334547755/c387957a25)

~~~
kinlan
It's also used to flash Android devices too.

------
soheil
Web Coffee API link tells you everything you need to know.

~~~
jan6
no, it doesn't tell me why there isn't a Web Team API ;p

~~~
jan6
*Tea, not Team

------
z5h
Surprised to find out covfefe is an actual protocol.

~~~
ehsankia
The documentation goes in much more detail.

------
gman83
If you'd have told me in 2010 that this would be the state of the art of the
web in 2020, I'd have been sorely disappointed...

~~~
holtalanm
personal opinion -- almost all of these features are really cool to me as a
user and a developer.

just shows, everyone's got an opinion.

------
jonshariat
This is an excellent resource to have when problem solving or brainstorming
solutions.

Anyone know if something like this exists for Android and iOS?

------
fenwick67
Who seriously thought the Battery Status API was a good idea? Someone thought
this was useful enough to write a spec for it...

~~~
duxup
I suppose you're doing what might be a resource intensive task and want to be
sure you don't kill the battery.

Granted I get folks might feel a rando website that is resource intensive
would be horrific, but maybe we're talking about some specific web app / use
case.

~~~
zzo38computer
Even so, I think battery API is not the proper way to do it. Some sort of
interrupt command (like UNIX has) may be better.

------
time0ut
Sigh. I fell for the Web Coffee API link. I saw mention of a covfefe protocol
and was excited to read about it.

~~~
rarecoil
I did the same. I was hoping for an HTCPCP-like W3C specification that I had
somehow missed.

------
arthurcolle
Payments API is lit. Didn't realize I could do it from the browser!

------
kinlan
Hahahaha. There's an amazing flattering IR photo of me in there :)

------
karatekidd32v
Wow "Web Coffee API" \- something I didn't know I needed

------
pjmlp
I guess we can apply Greenspun's rule to modern browsers:

"Any sufficiently complicated browser contains an ad-hoc, informally-
specified, bug-ridden, slow implementation of half of operating system."

------
starpilot
Can I create water, that I can _feel_?

------
kovac
Looking at these, I feel that browsers do way too many things than they
should.

~~~
zzo38computer
Yes, I and others commented on other threads about such thing.

------
buboard
things you could do, if the browser supported them

------
benkitzelman
...love a bit of rick astley with my morning Covfefe....

------
nneonneo
The Web Coffee API ([https://github.com/luruke/browser-2020#web-coffee-
api](https://github.com/luruke/browser-2020#web-coffee-api)) is my favorite of
the bunch. I definitely recommend checking out the linked WHATWG
documentation, as well as the relevant RFC for the HTTP protocol:
[https://tools.ietf.org/html/rfc2324](https://tools.ietf.org/html/rfc2324)

What can’t a browser do these days?

~~~
mr_toad
> What can’t a browser do these days?

Detect that you’re _paying for bandwidth_ and not autoplay video.

