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
stephanie_zstephanie_z 

How to read cookie values in remote method

I have a class which only provides remote methods for AJAX calls. In one of the methods, I need to read a cookie which is set by other pages. I tried to use ApexPages.currentPage().getCookies().get(<cookiename>), but it doesn't work since ApexPages.currentPage() is null. I guess it might be because the class is not associated with any VF. Is there any other way to fetch cookie values in remote methods?