History navigation requests don't show up in network tab
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(Not tracked)
People
(Reporter: n.goeggi, Unassigned)
References
(Blocks 2 open bugs)
Details
History navigation requests dont show up in the network tab of the devtools. (history.back/forward()
, Clicking the back/forward button in the browser)
Example:
- Goto https://example.com
- Open devtools and click on the network tab
- On the same tab go to some other page e.g.: https://example.org
- Click the back button
The request that should be issued for going back to https://example.com is not recorded in the network tab. The request also doesn't show up if the "Disable cache" check box is checked. (The same can be seen when navigating using the forward button)
I would have expected to see these requests show up as normal requests (cached or not-cached).
As a side note: Requests issued via the reload button do show up.
Comment 1•4 years ago
|
||
Niklas, can you check if fission.autostart
is enabled for you in about:config
?
Comment 2•4 years ago
|
||
Note: if it's fission only, then this is most likely the same as Bug 1705380. The only difference is that it's triggered by bfcache instead of being triggered by server side target switching. We might rename 1705380 to make the bug clearer.
Updated•4 years ago
|
I am seeing this behavior with fission disabled or enabled in the 87 release and in my local nightly build (currently at this revision).
In the 88 release it appears to be fixed, so this might be a regression.
Comment 4•4 years ago
•
|
||
I've tested this on my machine:
- Win10
- Firefox 88
- Fission disabled (fission.autostart = false)
- Cache disabled
- Load http://odvarko.com/tests/fission/case2/odvarko.com.html
- Open DevTools and select the Network panel
- Reload the page, you should see 3 requests (html, js, fav-icon)
- Load http://janodvarko.cz/tests/bugzilla/1638259/
- You should see 2 requests (html, fav-icon)
- Click the back button: I am seeing just 1 request (fav-icon)
- Click the forward button: I am still seeing just 1 request (fav-icon)
I am seeing the same in Nightly, Fission disabled.
Is anyone seeing what I am seeing?
Comment 5•4 years ago
|
||
Hi Honza,
I see the same issue as you do.
i also see the same behavior with the first STR.
Updated•4 years ago
|
Comment 6•4 years ago
|
||
Navigating back and forth between example.org/com, we only get platform events related to the favicon:
[netmonitor] 17940078395405 - http-on-examine-cached-response 404 (http://example.org/favicon.ico)
[netmonitor] 17940078395405 - http-on-stop-request (http://example.org/favicon.ico)
[netmonitor] 17940078395406 - http-on-examine-cached-response 404 (http://example.com/favicon.ico)
[netmonitor] 17940078395406 - http-on-stop-request (http://example.com/favicon.ico)
So the issues comes from the server.
Comment 7•4 years ago
|
||
Oh, that's because the page are saved and restored from the bfcache... we should probably indicate that in the netmonitor somehow.
Comment 8•4 years ago
|
||
From the server we get a pagehide and pageshow events when navigating from/to a bfcached page.
That, instead of having a DOMWindowCreated event or JSWindowActor.didDestroy call.
You can easily observe BFCache from this method:
https://searchfox.org/mozilla-central/source/devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm#530-548
Updated•4 years ago
|
Comment 9•4 years ago
|
||
There could be a notification bar displayed at the top of the Network panel content (above the list of requests) explaining that some requests might be missing since the page was restored from BFCache and not really loaded over the network (no HTTP traffic).
The notification bar could be similar to the one we want to show in the Headers panel
See screenshot here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1671147#c1
Comment 10•3 years ago
|
||
Honza, is there a Fission devtools milestone that this is tracked for?
Comment 11•3 years ago
|
||
I've been retesting this, my results:
Fission Disabled
- Fission disabled (fission.autostart = false), Cache disabled (in the Net panel UI)
- Load http://odvarko.com/tests/fission/case2/odvarko.com.html
- Open DevTools and select the Network panel
- Reload the page, you should see 3 requests (html, js, fav-icon)
- Load http://janodvarko.cz/tests/bugzilla/1638259/
- You should see 4 requests (html, fav-icon and two CSP blocked requests: css, script)
- Click the back button: I am seeing just 1 request (fav-icon)
- Click the forward button: I am still seeing just 1 request (fav-icon)
Fission Enabled
- Fission enabled (fission.autostart = true), Cache disabled (in the Net panel UI)
- Load http://odvarko.com/tests/fission/case2/odvarko.com.html
- Open DevTools and select the Network panel
- Reload the page, you should see 3 requests (html, js, fav-icon)
- Load http://janodvarko.cz/tests/bugzilla/1638259/
- You should see 4 requests (html, fav-icon and two CSP blocked requests: css, script)
- Click the back button: I am seeing all 4 requests (html, 2 script, favicon)
- Click the forward button: I am still seeing just 3 requests (html, 2x fav-icon)
So, there are some duplicated requests when Fission is enabled.
It would be fine to not show requests coming from the BFCache at all and mimic the previous behavior.
Also, we shouldn't show any duplicates.
In a follow up (of if it's straightforward now), we could show "bfcached" in the Transferred columns (this column shows "cached" for requests coming from regular browser cache) and text color of the request should be gray (the same gray we use for standard cached requests)
Honza
Updated•3 years ago
|
Comment 12•3 years ago
|
||
Retesting this again, looking if bug 1713607 has any positive impact on this scenario too
Fission Disabled
Still the same just like before (I am seeing only the request for favicon)
Fission Enabled + BFCache in parent disabled
I am seeing all the proper requests even if the page is loaded from BFCache (navigating back and forward)
Those requests should be marked as coming from a cache (ideally there should be 'from bfcache' label
Fission Enabled + BFCache in parent enabled
The panel isn't updated at all when going back and forward in history. So, I am seeing requests of the last page that was not loaded from BFCache and every time I go back/forward a request for favicon is added to the list.
Honza
Updated•3 years ago
|
Updated•3 years ago
|
Description
•