Validate setCacheEnable and setRequestInterception usage
See original GitHub issueI got a question on Puppeteer-Sharp saying something like:
I want to enable cache, to cache images, but I need to intercept my xhr request. When I set
setRequestInterception
, cache stop working.
So I ended up reading some changes made on #4260. Here _updateProtocolCacheDisabled to be more specific.
So, I have two questions regarding this piece of code:
cacheDisabled: this._userCacheDisabled || this._protocolRequestInterceptionEnabled
- Do we need to disable the cache there, when the user explicitly opted to enable it?
- If so, as those are two explicit actions made by the user (
setCacheEnable
andsetRequestInterception
), Shouldn’t we assert there saying something likeCannot user setCacheEnable and setRequestInterception at the same time
?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:31
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Page.setRequestInterception() method - Puppeteer
Activating request interception enables HTTPRequest.abort(), HTTPRequest.continue() and HTTPRequest.respond() methods. This provides the capability to ...
Read more >Using setRequestInterception in Puppeteer - The Parsed Web
Use setRequestInterception to customize handling of browser requests, both before the request begins and after it completes.
Read more >Use setRequestInterception in Puppeteer With Examples
Use the setRequestInterception method in your next Puppeteer project with LambdaTest Automation Testing Advisor. Learn how to set up and run automated tests ......
Read more >Request interception with Puppeteer and Playwright
When we browse the web, a series of HTTP requests and responses are exchanged between our browser and the pages we are visiting....
Read more >Validation - Laravel - The PHP Framework For Web Artisans
To do this, we will use the validate method provided by the Illuminate\Http\Request object. If the validation rules pass, your code will keep...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue described by @liweixi100 is described in #7038 and solved by #7060.
See https://github.com/hardkoded/puppeteer-sharp/pull/1765