Posted on 23/10/2023 16:48:30
Hi Kasper
You can set a response header on all pages using the security setup here:
https://doc.dynamicweb.com/documentation-9/platform/advanced-settings/web-and-http#3518
If you want to set a cookie on a specific page only, you either have to do a notification subscriber or add it to the template:
I.e. You can use Dynamicweb cookie manager to support cookie opt-in settings:
var cookie = new Cookie("Name", "Value");
CookieManager.SetCookie(cookie);
or use the cookies directly:
Dynamicweb.Context.Current.Response.SetCookie