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)
Moving into Developer Tools: Netmonitor component. Filter on NETMONITORAMA.
FWIW, Firebug showed this informatino within the 'Cache' tab of an expanded request. Sebastian
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
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