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

setRequestInterception disables caching. I need it not to do that. #6915

Closed
jribbens opened this issue Feb 21, 2021 · 7 comments
Closed

setRequestInterception disables caching. I need it not to do that. #6915

jribbens opened this issue Feb 21, 2021 · 7 comments

Comments

@jribbens
Copy link

jribbens commented Feb 21, 2021

The documentation says that page.setRequestInterception disables "page caching", without explaining what "page caching" is or why it is being disabled. Firstly, it looks like it actually means it disables all caching. Secondly, I need it not to do that. Why does it happen? There is no obvious connection between the two things. If I were to do:

  await page.setRequestInterception(true)
  page.on('request', request => request.continue())
  await page._client.send('Network.setCacheDisabled', { cacheDisabled: false })

would anything bad happen, and if so, what?

@whalderman
Copy link

On why that happens: #2905 (comment)
Also see #6996

@jribbens
Copy link
Author

I think they're saying that the only problem is that if caching is not disabled, then requests served from the cache will not be intercepted? If so then it would be very much worth saying so in the documentation - I think for my application that wouldn't be a problem at all (if I didn't want to block or alter the request the first time it was issued, I'm unlikely to want to do so on subsequent occasions).

@Androbin
Copy link
Contributor

Androbin commented May 7, 2021

#7060 was just merged, it solves the issue that originally led to the decision to disable the cache

@jribbens
Copy link
Author

jribbens commented May 7, 2021

#7060 was just merged, it solves the issue that originally led to the decision to disable the cache

Excellent, hopefully there will now be a patch to allow request interception with cache enabled :-)

@Androbin
Copy link
Contributor

Androbin commented May 8, 2021

@jribbens See #6996, and #7217

@stale
Copy link

stale bot commented Jun 24, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 24, 2022
@jribbens
Copy link
Author

This issue was fixed in Puppeteer version 9.

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

No branches or pull requests

3 participants