No cookie set from the browser, need to " "visit setcookie.yaws " "to set the cookie first ~n", []); PidStr -> Pid = list_to_pid(PidStr), Pid ! {self(), tick}, receive {Pid, VisitList} -> f("
Yes, I read your cookie " "You have vistited this page ~w times " "they were ~n
You had a cookie, but the pid handling your sess " "timedout ...",[]) end end, {html, L}.
The code to read the cookie, is simple, we get the cookie passed to the yaws code in the #arg structure which is the argument supplied to the out/1 function.
We use the yaws_api:find_cookie_val/2 function to parse
the raw cookie string passed to us from the browser.
The code is: