Are static assets cached between requests? #651
-
I don't really know how Puppeteer works or how this wrapper manages it so maybe it is a simple answer. If I have multiple requests which need to load static assets (e.g. images, scripts) and assuming those are cacheable will they be cached or will they be fetched fresh for each request? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@colinmollenhour I have not checked the detailed behavior, it may be Because Puppeteer's Page has setCacheEnabled() method defaults to https://pptr.dev/api/puppeteer.page.setcacheenabled Note that hc-pdf-server uses multiple Pages by default. If you want to Page.setCacheEnabled() to false, I will consider adding the feature to switch in env. |
Beta Was this translation helpful? Give feedback.
@colinmollenhour
Hi,
I have not checked the detailed behavior, it may be
cacheable will they be cached
, per Puppeteer's Page.Because Puppeteer's Page has setCacheEnabled() method defaults to
true
.https://pptr.dev/api/puppeteer.page.setcacheenabled
Note that hc-pdf-server uses multiple Pages by default.
If you want to Page.setCacheEnabled() to false, I will consider adding the feature to switch in env.