| Index: content/browser/service_worker/service_worker_dispatcher_host.cc
|
| diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| index 61e00876ff90acfedd5b76e23e8af7dc4d2835ca..84f35ca747d234abf190b8535182247f2b6bfa99 100644
|
| --- a/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| @@ -435,10 +435,12 @@ void ServiceWorkerDispatcherHost::OnUpdateServiceWorker(int thread_id,
|
| return;
|
| }
|
|
|
| - // The spec says, "update() pings the server for an updated version of this
|
| - // script without consulting caches", so set |force_bypass_cache| to true.
|
| + // update() does not always bypass the browser cache. It obeys the same rule
|
| + // as other update attempts that bypasses the browser cache only when
|
| + // min(Cache-Control's max-age value, 86400) seconds have passed since the
|
| + // last update.
|
| GetContext()->UpdateServiceWorker(
|
| - registration, true, /* force_bypass_cache */
|
| + registration, false, /* force_bypass_cache */
|
| provider_host, base::Bind(&ServiceWorkerDispatcherHost::UpdateComplete,
|
| this, thread_id, provider_id, request_id));
|
| }
|
|
|