Re: [w3c/push-api] Push subscription endpoint autodiscovery in HTML page: rel="alternate" type="urn:ietf:params:push" (#299)

I believe the correct thing would be `<link rel='push'>` though.

I'm not asking about using a push server alternate to the browser-vendor one, but for a simple way to advertise to the browser that there's an Push endpoint on the page.

Using `<link re='alternate'>` is incorrect though inspired from RSS semantic, but has more general and precise meaning, hence I believe the confusion.

If there were a `<link rel='push'>` meta tag, it would be up to the browser implementation to bind it to `PushManager.subscribe()`.

It would (slightly?) modify the current Push model, as currently it's only up to the browser to initiate the Push subscription request (with some design considerations, like prompting for notification permission only at some point in the site/app), whereas with a _Click & Subscribe to Push_ button the user could immediately subscribe to the Push service, without having to reach certain pages or events before subscribing to the Push endpoint.

Going further, there could be a notion of Push subscription channel,  and that would be advertised like:
```xml
<link rel="push" href="urn:push:channel:blog">
<link rel="push" href="urn:push:channel:blog:comment">
```
with again something similar to RSS feeds displayed below the RSS button, but that's really far fetched at that point.

Anyway, I think having a way to advertise to the browser that there's  Push endpoint available on the site, using an HTML meta tag, would be useful.

Something similar to [PuSH](https://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html#discovery) in spirit, and functionally equivalent to `<link rel="web-socket" href="wss://live.github.com/_sockets/*">` which actually sends WS messages like that one (FYI :smiley:):

```json
{
 "'data": "['notification-changed:2463',{'aria_label':'You have unread notifications','ga_click':'Header, go to notifications, icon:unread','span_class':'mail-status unread'}]"
}
```




-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/issues/299#issuecomment-417855831

Received on Saturday, 1 September 2018 12:17:13 UTC