This should be done.
1 Like
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.