There's no caching information available in the monitor

NEW
Unassigned

Status

()

Firefox
Developer Tools: Netmonitor
P3
normal
4 years ago
7 months ago

People

(Reporter: vporof, Unassigned, Mentored)

Tracking

(Blocks: 1 bug, {dev-doc-needed})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Cached requests (304) should be marked out differently in the requests menu, and more detailed caching information should be shown somewhere in the details pane. For example, firebug shows something like this:

Data Size       20035
Device          disk
Expires         Sat Apr 05 2014 19:44:49 GMT+0300 (EEST)
Fetch Count     4
Last Fetched    Sun Apr 07 2013 12:45:31 GMT+0300 (EEST)
Last Modified   Sun Apr 07 2013 12:45:31 GMT+0300 (EEST)
(Reporter)

Comment 1

4 years ago
Moving into Developer Tools: Netmonitor component. Filter on NETMONITORAMA.
Component: Developer Tools → Developer Tools: Netmonitor
Summary: [netmonitor] There's no caching information available in the monitor → There's no caching information available in the monitor
(Reporter)

Updated

4 years ago
Priority: -- → P3
FWIW, Firebug showed this informatino within the 'Cache' tab of an expanded request.

Sebastian
Blocks: 991806
Keywords: dev-doc-needed
Created attachment 8831086 [details]
cache.png

Firebug's Net panel (cache tab) screenshot.

Honza
Here is how Firebug fetches cache data from the platform:
https://github.com/firebug/firebug/blob/master/extension/content/firebug/net/netCacheReader.js#L218

Honza
Mentor: odvarko@gmail.com
Keywords: good-first-bug
Some instructions for the implementation:

1) There should be a new panel "Cache" implemented alongside other panels like, Headers, Params, etc.

2) Here is implementation of existing panels. Implementation of the new Cache panel will be very similar
* https://dxr.mozilla.org/mozilla-central/rev/1e0e193b0812f68a12fbd69198552af62347af1e/devtools/client/netmonitor/shared/components/params-panel.js#37
* https://dxr.mozilla.org/mozilla-central/rev/1e0e193b0812f68a12fbd69198552af62347af1e/devtools/client/netmonitor/shared/components/headers-panel.js#42

3) The new Cache panel should also utilize `PropertiesView` just like other panels. It should simplify the work.

4) The Cache panel doesn't probably need filter input box so, the `enableInput` property (for the PropertiesView component) should be set to false.

5) The cache data should be fetched from the platform using CacheStorageService (introduced in Firefox 32). See Firebug's implementation as an example:
https://github.com/firebug/firebug/blob/master/extension/content/firebug/net/netCacheReader.js#L32

6) Fetching the data should happen on the backend. See e.g. how response content is fetched: https://dxr.mozilla.org/mozilla-central/rev/1e0e193b0812f68a12fbd69198552af62347af1e/devtools/server/actors/webconsole.js#2076. Back compatibility should be preserved so, client should be able to work with backend that doesn't support this new feature (ie fetching cache data)

Here is how the Client fetches the response content
https://dxr.mozilla.org/mozilla-central/source/devtools/client/netmonitor/netmonitor-controller.js?q=this.webConsoleClient.getResponseContent%28actor%2C&redirect_type=single#618

---

Btw. Since the backend implementation is involved in this bug, I am removing good-first-bug flag. The patch doesn't have to be so simple.

Honza
Keywords: good-first-bug
You need to log in before you can comment on or make changes to this bug.