Set Cookies
Set cookies before rendering to access authenticated content or personalized views
The set_cookie
parameter allows you to set cookies before the rendering process begins.
Overview
When rendering webpages that require authentication or personalization, you may need to set specific cookies. The set_cookie
parameter lets you configure cookies that will be sent with requests during the rendering process.
Parameter details
Configures cookies that will be sent with requests during the rendering process
Usage
Behavior
The specified cookie is set before any requests are made during the rendering process. This allows you to:
- Access authenticated content
- View personalized pages
- Bypass login screens
- Render content that requires specific cookie values
Important notes
- The
domain
value must match the domain of the URL being rendered - Only one cookie can be set per request
- Cookies are only valid for the current rendering session
Use cases
This parameter is particularly useful for:
-
Authenticated content: Render pages that require user login by providing session cookies.
-
Personalized views: Capture user-specific views by setting identity or preference cookies.
-
Testing: Validate how pages appear with different cookie values.