How to read cookies set by JavaScript in Apex/Visualforce controller !

CEO

This might be a requirement, if you are developing some complex navigation, for ex.

  • User lands on a visualforce page  “A”

  • from here user is redirected to some other page “B”

  • Now when user returns to page “A” you want to make sure, some operations are done on page “B”, of course one can create database records for the same. But that might be too much to maintain for some trivial tracking requirements. So Cookies seems to be a good fight in this scenario, if some desired operation is done on page “B” a cookie can be set, that in turn can be read by Apex Controller at page “A”.

Read More: https://abhinav.fyi/how-to-read-cookies-set-by-javascript-in-apex-visualforce-controller/

Abhinav Gupta

First Indian Salesforce MVP, rewarded Eight times in a row, has been blogging about Salesforce, Cloud, AI, & Web3 since 2011. Founded 1st Salesforce Dreamin event in India, called “Jaipur Dev Fest”. A seasoned speaker at Dreamforce, Dreamin events, & local meets. Author of many popular GitHub repos featured in official Salesforce blogs, newsletters, and books.

https://abhinav.fyi
Previous
Previous

Calling Marketo SOAP API from Salesforce APEX Classes !

Next
Next

Is Javascript Remoting == ViewStateLess Visualforce ?