Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ignoreSearch to fix precaching broadcast updates. #1914

Merged
merged 1 commit into from
Feb 26, 2019

Conversation

jeffposnick
Copy link
Contributor

This will pass ignoreSearch: true through to the underlying call to cache.match() that attempts to find the previously precached entry with the same URL, in order to detect whether there's been an update. This is in turn used by the broadcast-update plugin.

This is necessary in v4 because the previously cached URL may have a __WB_REVISION__ URL query parameter.

This should only affect cache wrapper usage from within the PrecacheController, as in all other uses, the matchOptions will remain undefined.

CC: @webmaxru

@workbox-pr-bot
Copy link
Collaborator

PR-Bot Size Plugin

Changed File Sizes

File Before After Change GZipped
packages/workbox-core/build/workbox-core.prod.js 5.43 KB 5.46 KB +1% 2.36 KB
packages/workbox-precaching/build/workbox-precaching.prod.js 4.21 KB 4.24 KB +1% 1.70 KB

New Files

No new files have been added.

All File Sizes

View Table
File Before After Change GZipped
packages/workbox-background-sync/build/workbox-background-sync.prod.js 3.60 KB 3.60 KB 0% 1.56 KB
packages/workbox-broadcast-update/build/workbox-broadcast-update.prod.js 1.85 KB 1.85 KB 0% 934 B
packages/workbox-build/build/_types.js 41 B 41 B 0% 61 B
packages/workbox-build/build/index.js 3.64 KB 3.64 KB 0% 1.36 KB
packages/workbox-cacheable-response/build/workbox-cacheable-response.prod.js 584 B 584 B 0% 348 B
packages/workbox-cli/build/app.js 5.58 KB 5.58 KB 0% 1.98 KB
packages/workbox-cli/build/bin.js 1.16 KB 1.16 KB 0% 580 B
packages/workbox-core/build/workbox-core.prod.js 5.43 KB 5.46 KB +1% 2.36 KB
packages/workbox-expiration/build/workbox-expiration.prod.js 2.84 KB 2.84 KB 0% 1.24 KB
packages/workbox-google-analytics/build/workbox-offline-ga.prod.js 1.90 KB 1.90 KB 0% 902 B
packages/workbox-navigation-preload/build/workbox-navigation-preload.prod.js 657 B 657 B 0% 321 B
packages/workbox-precaching/build/workbox-precaching.prod.js 4.21 KB 4.24 KB +1% 1.70 KB
packages/workbox-range-requests/build/workbox-range-requests.prod.js 1.52 KB 1.52 KB 0% 762 B
packages/workbox-routing/build/workbox-routing.prod.js 3.39 KB 3.39 KB 0% 1.48 KB
packages/workbox-strategies/build/workbox-strategies.prod.js 4.86 KB 4.86 KB 0% 1.19 KB
packages/workbox-streams/build/workbox-streams.prod.js 1.38 KB 1.38 KB 0% 682 B
packages/workbox-sw/build/workbox-sw.js 1.34 KB 1.34 KB 0% 745 B
packages/workbox-webpack-plugin/build/generate-sw.js 5.29 KB 5.29 KB 0% 1.84 KB
packages/workbox-webpack-plugin/build/index.js 349 B 349 B 0% 255 B
packages/workbox-webpack-plugin/build/inject-manifest.js 7.22 KB 7.22 KB 0% 2.48 KB
packages/workbox-window/build/workbox-window.dev.umd.js 30.38 KB 30.38 KB 0% 8.01 KB
packages/workbox-window/build/workbox-window.prod.umd.js 4.66 KB 4.66 KB 0% 1.81 KB

Workbox Aggregate Size Plugin

8.86KB gzip'ed (59% of limit)
22.19KB uncompressed

Copy link
Member

@philipwalton philipwalton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants