Navigation preload may break the devtools user agent override |
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 Steps to reproduce the problem: 1. Navigate to the desktop version of a page with navigation preload set up. In our case, the server decides whether to serve a desktop or mobile version of the page based on the user agent. 2. Go into chrome devtools and enable "Toggle Device Toolbar" 4. Reload the page (server should serve the mobile version now based on the user agent) and see the desktop version still shown Note: Our serviceworker fetch handler doesn't do anything special, it's just a passthrough. What is the expected behavior? Mobile version of the page is shown, due to the User-Agent override. What went wrong? I'm not sure. The User-Agent shown under the Headers tab is "User-Agent:Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Mobile Safari/537.36", but when I look at the same request that's going on in chrome://net-internals it shows my desktop UA which is "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36". Did this work before? No Chrome version: 57.0.2987.133 Channel: stable OS Version: OS X 10.12.4 Flash Version: When I disable the serviceworker or install a serviceworker without the navigationpreload setup, the request/response cycle works as expected.
,
Apr 19 2017
+horo@ for visibility.
,
Jul 19 2017
,
Aug 3 2017
This seems similar to the the Plznavigate + DevTools issues like issue 749884 and issue 746220 . Nav preload occurs on navigation and probably there's no plumbing for it to respect the DevTools settings on the foreground tab.
,
Dec 14 2017
,
Dec 14 2017
,
Mar 6 2018
,
Sep 18
,
Dec 29
claywoolam@ I'm not able to reproduce this on Mac, can you try to reproduce this again? |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by caseq@chromium.org
, Apr 19 2017Components: -Platform>DevTools Platform>DevTools>Mobile Platform>DevTools>Network
Labels: -OS-Mac OS-All
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)