This should be done.
const isPrerender = /HeadlessChrome/.test(window.navigator.userAgent)
console.log(isPrerender) when I do this I get false. Do I need to wait 24-48 hours?
Url: https://vacbid.com/tr/stay-detail/rixos-premium-belek?stayId=87726
You cannot console.log()
a prerendered response as it isn’t running javascript in your browser. It is running the javascript in the headless chrome instance. You have no way to see console.log()
output in the prerendering service. The only exception would be if you are running a debugging instance of the prerendering service locally in a docker container.
I’ve tested the URL above and I can confirm prerendering is triggered if an appropriate user agent is used.
Would it be possible to enable this for bluesky?
Edit: also wondering how long a page stays cached, and am a bit more curious about the flow on caching pages. It says 24-48 for a page to be cached, but does that mean for it to be refreshed, or does that mean that after 48 hours it won’t be in the cache anymore. What triggers a re-cache?
Do you have an officially documented user agent for it?
After 48 hours it won’t be cached anymore and any new request would result in re-prerendering of the entire page.