Is it possible to intercept and cache WebSocket messages in a Service Worker like all the examples do for normal HTTP requests?
问题 I know you can create WebSocket connections from within a Service Worker itself; my question is more whether or not you can use a WebSocket from your app as normal and have the Service Worker intercept / cache WebSocket requests just like it can do for normal HTTP fetch requests? Here's an example of intercepting and caching a normal HTTP request from a Service Worker. self.addEventListener('fetch', function(event) { // If a match isn't found in the cache, the response // will look like a