Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

CSS/img pulled from browser cache won't be reported in matrix #93

Open
gorhill opened this issue Dec 18, 2013 · 5 comments
Open

CSS/img pulled from browser cache won't be reported in matrix #93

gorhill opened this issue Dec 18, 2013 · 5 comments
Labels
Milestone

Comments

@gorhill
Copy link
Owner

gorhill commented Dec 18, 2013

That's because there is no onBeforeRequest() triggered for these. That sucks.

Potential fix: just like for scripts/plugins, inspect the DOM and collect occurrences from there as well.

@gorhill
Copy link
Owner Author

gorhill commented Jan 17, 2014

I started a fix for this, and now one of the side effect of the solution is that requests might be reported twice in the log, because one request might have been recorded through onBeforeRequest() and another through DOM analysis.

Need to find a way to mitigate this.

@gorhill
Copy link
Owner Author

gorhill commented Jan 18, 2014

I should give a try to webRequest.onResponseStarted or webRequest.onCompleted and check the details.fromCache flag, looks promising.

@gorhill
Copy link
Owner Author

gorhill commented Jan 18, 2014

By the way, a good way to verify the bug is:

  • Go to http://arstechnica.com/
  • Open the Statistics page and narrow the log to http://arstechnica.com/
  • Put the text cursor in the address bar of http://arstechnica.com/ and hit Enter
    • Do not force refresh, as this soft clear the cache I believe
  • The Statistics page should show that very few items were logged following the main_frame event.
    • Since currently items are logged only for when items are not fetched from the cache.

To confirm any fix works, check that all items on the page are logged, not just those items outside the cache.

@gorhill
Copy link
Owner Author

gorhill commented Jan 18, 2014

Alright, I am losing track of, and forgetting earlier findings and now I am back to square one.

webRequest.onResponseStarted/details.fromCache is no good, it works for objects pulled from the on-disk cache, not the in-memory cache. This bug here causes the following scenario to happen, which I should have documented first time I entered this bug:

This is the bug. Still no solution.

@my-password-is-password
Copy link
Contributor

What about using DOM Mutation Observers?

Found this https://code.google.com/p/mutation-summary/

@ghost ghost assigned tailHey Jan 29, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants