Learn about how HubSpot prerenders content to improve page load speed and security.
?hsDebugOnly=true
: load the page with a ?hsDebugOnly=true
query parameter. This will include an indication if the page can be prerendered. If it can’t be prerendered, a list of issues that prevent prerendering will appear, along with specific files and template line numbers. If the formatting of the debug information is hard to read, you can use the parameter ?hsDebug=true
instead. When you inspect the page with that query parameter, the same debug information will appear in a formatted HTML comment near the bottom of your page.X-HS-Prerendered
: look for the X-HS-Prerendered
header in the HTTP response headers of the page request. This header will only be present if the page is prerendered, and it will include the value of the last time the page was prerendered. You can find this information by inspecting the page, clicking the network tab, and looking at the response headers for the page request.account
company
contact
local_dt
owner
request_contact
request.cookies
request.full_url
request.headers
request.path_and_query
request.query
request.query_dict
request.referrer
request.remote_ip
request
variables aren’t compatible with prerendering, they generally have JavaScript alternatives you can use to access similar information.
personalization_token()
today()
?hsPrcDebug=true
query parameter, and there will be additional output about the prerendered content for that page. If the page is prerendered, the X-HS-Prerendered
header will be present and contain partial
before the time the page was partially prerendered.
Below is a list of HubL variables and filters that are currently supported with partial prerendering. Pages that include these variables and filters will be partially prerendered, and any expressions that include them will be evaluated at serve-time.
account
company
contact
local_dt
owner
query
request
request_contact
year
|random
|shuffle
request
HubL variables aren’t compatible with prerendering, these variables generally have JavaScript alternatives you can use to access similar information.
For example, instead of the request.cookies
variable, you could use the cookie property. Below is an example of using HubL vs. JavaScript to dynamically display content based on whether the user has visited the site before (based on their cookies).