Odd "data-preloaded" element in HTML

This block of data contains the “after-boot” information for the Discourse JS app. When you hard-reload a topic page, the block contains the information needed to render the topic, without contacting the server again.

It’ll show up on every Discourse page when you view source or hard refresh. If you’re navigating around by clicking, though, the block isn’t used and data is fetched dynamically from the server.

Note that not every page actually supports the preload block, so on those pages the content will be empty and a second request to fetch the real data for the page will be required. The important pages support it.

The contents are personalized to you while logged in, yes, but there shouldn’t be any sensitive information that you don’t already have access to.

4 Likes