On 5 Sep 2003, at 04:48, James.Q.L wrote:

in mod_perl how do i detect if users choose to reject the cookie being sent to them and/or having
the cookie disable in browser ? (not javascript or other client-side scripting) so that i can
print a error message remind user to enable cookie.

Here's a scheme that works for me:


Set the cookie.
Redirect them to a page that expects the cookie.
In your handler, if you're visiting a page that expects the cookie you take one of two actions:
- If the Referer was the page that's supposed to set the cookie, send them to the page telling them to turn on cookies.
- Otherwise send them back to the page that sets the cookie (usually a login page).


It's a simple scheme, and relies on Referer which everyone will now tell me is bad, but it does work.

Matt.



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to