Broken crawler view when you disable Javascript

AI-generated summary

The discussion revolves around the issue of a broken crawler view when JavaScript is disabled. stance455 encountered this error and discovered that Google’s crawler appears to have turned off JavaScript, likely due to the use of prerender. They shared screenshots comparing the broken view to the correct view when the user agent is changed to Google smartphone bot.

sam responded that this is a deliberate design choice for mobile optimization. When a modern user agent is detected and the user is browsing from a mobile device, the text payload is omitted to optimize transit for mobile phones. This behavior is not currently configurable but may be considered for future implementation if there is sufficient demand.

Ran into this error while looking at something else but basically if you disable JS in chrome

You get this

Instead of this, which is what you get if you change the user agent to Google smartphone bot

Google bot was crawling my instance and lately seems to have turned of JS in their crawler for me.

I think it has to do with me using prerender for about a month… so its adjusting to JS files instead of all html . Every 10 or so tests Ill see the screenshot that it renders correctly.

But most of the time it gives the format you see in the first screenshot. Time will tell.

This is by design, we have a mobile optimisation.

IF the useragent is modern AND you are browsing from mobile THEN we omit the text payload to optimise transit for mobile phones.

Not configurable, possibly we could do this longer term if there is enough demand for it.

3 Likes