GoogleChromeLabs / sw-toolbox

[Deprecated] A collection of service worker tools for offlining runtime requests
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
3.62k stars 331 forks source link

Issue with Multiple Tab open with one mobile view through chrome dev tools #266

Closed kapilgp closed 7 years ago

kapilgp commented 7 years ago

We are getting an issue if mobile view of chrome dev tools is open than all other tabs open mobile site instead of Desktop site.

Is it known issue or do we have any fallback for that. Also it is with all approaches of sw-toolbox even with networkOnly also

global.toolbox.router.default = global.toolbox.networkOnly;

jeffposnick commented 7 years ago

If you're aggressively caching and reusing content, I'd recommend using runtime logic, like CSS media queries, to adjust the display of your site, rather than having your web server return different responses for different types of clients.

Otherwise, if you need to have different responses for different types of clients, using a less aggressive caching policy would be your best bet, so that things just fall back to the cache and go network-first.

sw-toolbox won't cache anything by default, so if you're seeing content cached more aggressively than you expect, it must be due to your configuration. Please re-examine that.