Is it possible to fetch a page without downloading fonts?
For a specific page the fonts (ttf, otf, woff, woff2) are massive (over 20MiB !) and provide no value.
Is there a Playwright setting to prevent fetching specific resources? So I could exclude *.ttf
or whatever (fonts, css, js, video, audio, etc.)
This thread is trying to answer question "Is there a Playwright setting to prevent fetching specific resources such as fonts?"
Specific setting no, however you can use route
with abort, something like:
await page.route('wildcardToMatchFontsRequest', (route) => route.abort())
here is a video with more details: https://www.youtube.com/watch?v=hk6ND5gVdyc
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].