Reputation: 739
As known when user logging into the google account if the cookies are disabled in the browser google prompts the 'Activate cookies' message to the user and restricts the login. I want same type of functionality to implent in java for my website. I did not understand how it can be done. I googled this but did not find much related information. It would be great if i receive some valuable comments. Thanks in advance
Upvotes: 0
Views: 85
Reputation: 1133
The only reliable test whether cookie are enabled or not is to try it out. Set a cookie on the home page of your app, redirect to another page and test if the cookie is set. This can be done both on the server side using the appropriate HTTP headers, or on the client using JavaScript.
Upvotes: 1