function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
College ManagementCollege Management 

Any way to setDomain for Cookie in salesforce ?

Is there any possibility to change or set domain for cookies in browsers ?

User-added image

Help me out

Thanks !
Santosh Sriram 2310Santosh Sriram 2310

You can set cookies via salesforce class using the Cookie class and its constructor.
Check the link below:

_ Santosh 
Jack ZarynskyJack Zarynsky
OP, how you sorted first field?
College ManagementCollege Management

In provided ref there is nothing to set domain ,
Constructor : Cookie(name, value, path, maxAge, isSecure)
We can provide name, value, path , age and security but there is no way setting domain. No idea how the cookie has been setting its domain in browser.


First field in the sense ?

Thanks !