Skip to content

Commit f5804b1

Browse files
committed
Add note about polyfills in live update docs
1 parent 85d06e5 commit f5804b1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Don't see your favorite database here? Writing your own adapter is super easy! S
8383

8484
### Live updates
8585

86-
micro-analytics also let's you listen into updates live with [server-sent events].
86+
micro-analytics also let's you listen into updates live with [server-sent events][].
8787
That means you can e.g. build a realtime dashboard for your analytics!
8888

8989
Note: Make sure your database adapter supports this feature. If not, bug them to implement it!
@@ -97,7 +97,13 @@ sse.onerror = function (error) { console.error('[sse error]', error) }
9797
sse.addEventListener('micro-analytics-ping', function (e) { console.log('[sse]', e) })
9898
```
9999

100+
#### Browser support
101+
102+
Server-sent events is not supported in all browsers. This can easily be fixed by using a polyfill.
103+
Take a look at [the caniuse table][] for server-sent events if you need one.
104+
100105
[server-sent events]: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events
106+
[the caniuse table]: http://caniuse.com/#feat=eventsource
101107

102108
## License
103109

0 commit comments

Comments
 (0)