New issue
Advanced search Search tips

Issue 730624 link

Starred by 5 users

Issue metadata

Status: Archived
Owner: ----
Closed: Aug 21
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Visibility into service worker control over localhost

Project Member Reported by jeffy@google.com, Jun 7 2017

Issue description

Service workers (https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) bring with them some fundamental changes to the assumptions that most developers have about development on localhost (or the equivalent IP addresses). For instance, a service worker that uses a cache-first strategy inside of its fetch handler might end up responding to HTTP requests with stale content long after the corresponding local web server has been stopped.

I'm going to file some other feature requests with suggestions for working around specific scenarios, but a general suggestion that I wanted to track here was increased visibility somewhere in the Chrome UI when there's a service worker controlling the current navigation and the origin is localhost.

This might entail an automatic "butter bar", or some badging in the URL bar, or badging in the tab. It should ideally be persistent. It also might include a message in the JS console log, but (I think) it's important that we show something that is visible to developers even if they don't have DevTools open.

This suggestion doesn't apply to non-localhost navigations, with the assumption that anything non-localhost should be treated as a "production" deployment.
 
Components: -Platform>DevTools>UX UI>Browser
This sounds primarily like a Chrome UI issue and not a DevTools UI (even though the use case is for developers). DevTools currently reports if a resource was served by a service worker in the Network panel and reports the state of the service worker in the Application panel. Feel free to open an issue specific to DevTools if there's something I missed.

Not sure what the right component to assign this to.

Comment 2 by jeffy@google.com, Jun 20 2017

Components: -UI>Browser UI>Browser>Bubbles
I'm picking UI>Browser>Bubbles, which seems to be the component that encompasses those URL bar indicators.

Comment 3 by brentons@google.com, Jun 21 2017

Do common local subnets (e.g. 10.x.x.x, 192.168.x.x, 100.x.x.x) count as localhost-equivalent IPs?  It's pretty common to have Chrome for Android listening to a server on an adjacent computer, and not everyone knows about (or takes the time to set up) port forwarding.

Alternatively, perhaps chrome:inspect could check if the mobile tab's host is one of the IPs the computer is bound to; and if so, treat it like localhost & show whatever warning this issue ends up recommending.

Comment 4 by jeffy@google.com, Jun 21 2017

Common local subnets like 192.168.x.x are not whitelisted to allow service workers over http:

There's more background about what's allowed at https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features

Comment 5 by brentons@google.com, Jun 21 2017

Ahh - good point.  So, unless dev servers support HTTPS, it's a moot point anyway.
Project Member

Comment 6 by sheriffbot@chromium.org, Jul 13 2017

Labels: Hotlist-Google
Status: Archived (was: Untriaged)
Archiving old bugs that haven't been actively assigned in over a year.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!

Sign in to add a comment