googlearchive / web-push-encryption

[Deprecated] Encryption Utilities for Web Push protocol
Apache License 2.0
84 stars 23 forks source link

Document supported browser versions and protocols #32

Open ithinkihaveacat opened 8 years ago

ithinkihaveacat commented 8 years ago

It would be helpful to developers considering using this library if the README documented the browsers and protocols currently supported by the library, and the configurations that are expected to be supported in the future. (Maybe the version of Node, too.)

Something like:

GCM (tickle) GCM (bodies) VAPID
Chrome 47+ x NA NA supported now
Chrome 50+ x x NA supported now
Chrome 51+ (?) x x x will be supported
Firefox 44+ NA NA NA
Firefox 46+ NA NA x will be supported

Browsers in italics have not been released as of April 2016.

ithinkihaveacat commented 8 years ago

Some sort of guidance regarding how production-ready the library is would also be useful.

gauntface commented 8 years ago

Ta for this, will hopefully take a look some point soon and tag you in any PRs

jonathanpmartins commented 8 years ago

@gauntface tag me too! :)

addyosmani commented 8 years ago

I really like the idea of us including a compat table in the README like the one @ithinkihaveacat proposes.

ameyakarve commented 8 years ago

Additionally, a util that returns an ENUM by parsing navigator.userAgent will be handy. I'll raise a PR for this.

gauntface commented 8 years ago

@ameyakarve, I don't follow the use case for this util

ameyakarve commented 8 years ago

@gauntface So, if I were to implement support only for clients that support data-only pushes (which is much easier to maintain at the server side), it would be nice to have something that says whether that would be supported. I will probably be writing for work; I suppose others could find it useful too?

wibblymat commented 8 years ago

@ameyakarve UA sniffing is not needed at all, and generally a bad practice.

All of the different situations can be detected using feature detection.

@ithinkihaveacat: FF 46 is supported by this library. They changed it before it went to stable so that it matched the latest spec (at that time). FF <= 45 doesn't have an 'auth' value in the subscription, which is easy to detect, but it also requires some strings to be changed too. It's not too difficult to do, but I don't know that it's a priority, what with them being superseded by a new stable version.

ameyakarve commented 8 years ago

@wibblymat Would you have snippets for that? Is it as simple as looking at what the subscription object returns or am I missing anything?

gauntface commented 8 years ago

examining the subscriptionfor the author key would be enough. For chrome you'll still need to check for gcm endpoint and change accordingly.