Feature to ignore specific ResourceTypes in Puppeteer#589
Feature to ignore specific ResourceTypes in Puppeteer#589SanderElias merged 1 commit intoscullyio:masterfrom
Conversation
|
Can we first validate the change? If all good I will add tests where applicable! |
Can't seem to find any case where I should update / add tests. Is that correct? |
|
@samvloeberghs the tests are in the /test folder. We have jest and cypress e2e tests in there. |
|
@SanderElias
|
|
@samvloeberghs after the testing... any chance that you noticed an improvement in speed? If so, can you comment? |
|
In the order of 100 pages there was no performance improvement. I would need to run the tests for 1000 and 10000 pages. But the amount of bandwidth potentially saved is enormous in those test cases. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
All images / fonts / stylesheets are currently also loaded in Puppeteer when requesting a page. In most cases they are not relevant for prerendering the HTML.
What is the new behavior?
Any
ResourceTypethat is listed here will be ignored by the Puppeteer instance rendering the requested page. For example if you addimageandfontsall requests to images and fonts loaded on your pages will be blocked.Does this PR introduce a breaking change?
Other information