If you're using node.js you can use https://www.npmjs.com/package/watch, but I doubt it can be used from the browser.
If you're using the browser, you should probably fall back to either polling (if you can afford additional traffic) or watcher on the server side (e.g. with
watch) + notification to client (e.g. via