title: Sending push messages to all open chrome browsers via GCM
body: <p>I am trying to develop a web site which will send push notifications to all users currently watching it. I found some tutorials on how to send pushes to myself using GCM for Chrome and they are working fine,
  (<a href="https://github.com/gauntface/simple-push-demo" rel="nofollow">https://github.com/gauntface/simple-push-demo</a>)
  but I cannot understand how to send pushes to every user who is currently on my site and allowed to receive them. As far as I understand I need to collect their browser IDs when they subscribe</p>
  
  <pre><code>navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) {
  serviceWorkerRegistration.pushManager.subscribe({ userVisibleOnly: true })
    .then(onPushSubscription)
  </code></pre>
  
  <p>but I cannot find how to get and store them (perhaps in MySQL DB with PHP code) and after that how to send a push to everyone (probably to iterate over all browsers IDs in my DB and send pushes to everyone separately with cURL requests). On my site I have code which uses ServiceWorkers and handles users subscription but everything is working for me only. Noone who is else on a site does not receive any notifications. Any help would be appreciated.</p>