Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cached resources does not appear in har #77

Open
F3l1x78 opened this issue Sep 21, 2020 · 1 comment
Open

Cached resources does not appear in har #77

F3l1x78 opened this issue Sep 21, 2020 · 1 comment

Comments

@F3l1x78
Copy link

F3l1x78 commented Sep 21, 2020

Hello,
I am using chrome-har as a npm package to extract har from my puppeteer scenarios.

However, I can't see the requests served from cache when I reload any page.
Here is a quick check-list :

  • I observe the correct events (mostly Network.requestServedFromCache for my problem I guess)
  • I record all the events
  • I output everything in a har file.

I tested with a simple scenario : a load of https://google.fr as a first step, and then a reload of the page.
You can find attached the waterfalls/har of both steps :
Google_test_waterfall_cache.zip

For example the google logo is not present in the second capture
(https://www.gstatic.com/images/branding/googlelogo/1x/googlelogo_color_92x36dp.png)

Here are some log details that could be useful :
chrome-har_cache.zip

Perhaps I misunderstood and chrome-har cannot manage requests served from cache ?
The code seems to handle Network.requestServedFromCache, and I'm pretty sure I've already recorded a har which displayed cached ressources !

Don't hesitate if you want a full repro demo with puppeteer.

Thanks a lot, have a good day.

@soulgalore
Copy link
Member

Hi @le-chat-du-78 sorry for the late reply. The option object has a field includeResourcesFromDiskCache that if you set it to true will include them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants