Open Bug 1706388 Opened 3 years ago Updated 3 years ago

History navigation requests don't show up in network tab

Categories

(DevTools :: Netmonitor, defect, P3)

defect

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:

  1. Goto https://example.com
  2. Open devtools and click on the network tab
  3. On the same tab go to some other page e.g.: https://example.org
  4. 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.

Niklas, can you check if fission.autostart is enabled for you in about:config?

Flags: needinfo?(ngogge)

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.

See Also: → 1705380

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.

Flags: needinfo?(ngogge)

I've tested this on my machine:

  • Win10
  • Firefox 88
  • Fission disabled (fission.autostart = false)
  • Cache disabled
  1. Load http://odvarko.com/tests/fission/case2/odvarko.com.html
  2. Open DevTools and select the Network panel
  3. Reload the page, you should see 3 requests (html, js, fav-icon)
  4. Load http://janodvarko.cz/tests/bugzilla/1638259/
  5. You should see 2 requests (html, fav-icon)
  6. Click the back button: I am seeing just 1 request (fav-icon)
  7. 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?

Hi Honza,
I see the same issue as you do.
i also see the same behavior with the first STR.

Severity: -- → S3
Priority: -- → P3

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.

Oh, that's because the page are saved and restored from the bfcache... we should probably indicate that in the netmonitor somehow.

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

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

See Also: → 1671147

Honza, is there a Fission devtools milestone that this is tracked for?

Flags: needinfo?(odvarko)

I've been retesting this, my results:

Fission Disabled

  1. Fission disabled (fission.autostart = false), Cache disabled (in the Net panel UI)
  2. Load http://odvarko.com/tests/fission/case2/odvarko.com.html
  3. Open DevTools and select the Network panel
  4. Reload the page, you should see 3 requests (html, js, fav-icon)
  5. Load http://janodvarko.cz/tests/bugzilla/1638259/
  6. You should see 4 requests (html, fav-icon and two CSP blocked requests: css, script)
  7. Click the back button: I am seeing just 1 request (fav-icon)
  8. Click the forward button: I am still seeing just 1 request (fav-icon)

Fission Enabled

  1. Fission enabled (fission.autostart = true), Cache disabled (in the Net panel UI)
  2. Load http://odvarko.com/tests/fission/case2/odvarko.com.html
  3. Open DevTools and select the Network panel
  4. Reload the page, you should see 3 requests (html, js, fav-icon)
  5. Load http://janodvarko.cz/tests/bugzilla/1638259/
  6. You should see 4 requests (html, fav-icon and two CSP blocked requests: css, script)
  7. Click the back button: I am seeing all 4 requests (html, 2 script, favicon)
  8. 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

Fission Milestone: --- → M8
Flags: needinfo?(odvarko)
Whiteboard: dt-fission-m3-triage

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

Summary: History navigation requests dont show up in network tab → History navigation requests don't show up in network tab
Fission Milestone: M8 → ---
Whiteboard: dt-fission-m3-triage
You need to log in before you can comment on or make changes to this bug.