preNavigationHooks: [async ( // { // blockRequests // }, gotoOptions) => { // await blockRequests(); gotoOptions.waitUntil = 'domcontentloaded'; // fastest resolver }]
domcontentloaded
because sometimes with the load
option the page timeout, due the fact that the website has a lot of scripts :/ to load.page.route
to intercept some of the API request and extract the bearer token from it, but according to the docs, when I use page.route
it disables the browser caching. Taking into consideration that it has a lot of JS to load, I'd like to be able to cache these, but I wasn't able to achieve this either.