Skip to content
Browse files

fixup! feat(service-worker): support bypassing SW with specific heade…

…r/query param
  • Loading branch information...
gkalpak committed Apr 25, 2019
1 parent b42cd81 commit 9f6307de8c470bbb6e2a66df9e8d98aac9f1d7d2
Showing with 8 additions and 6 deletions.
  1. +7 −5 aio/content/guide/
  2. +1 −1 packages/service-worker/worker/testing/scope.ts
@@ -149,11 +149,13 @@ the app will be refreshed transparently from the network.

### Bypassing the service worker

In some cases you may want to avoid that the service worker is
handling the request. An example is when uploading files, where
you will not see progress events if the request is going through
the service worker. To bypass the serviceworker you can set `ngsw-bypass`
as a request header, or as a query parameter.
In some cases, you may want to bypass the service worker entirely and let the browser handle the
request instead. An example is when you rely on a feature that is currently not supported in service
workers (e.g.
[reporting progress on uploaded files](

To bypass the service worker you can set `ngsw-bypass` as a request header, or as a query parameter.
(The value of the header or query param is ignored and can be empty or omitted.)

## Debugging the Angular service worker

@@ -192,7 +192,7 @@ export class SwTestHarness implements ServiceWorkerGlobalScope, Adapter, Context
return {
origin: parsedUrl.origin || `${parsedUrl.protocol}//${}`,
path: parsedUrl.pathname,
search: || ''
search: || '',

0 comments on commit 9f6307d

Please sign in to comment.
You can’t perform that action at this time.