Geray Suinov
Geray Suinov

Reputation: 3691

How to define the option to save the cookies at FireFox (javascript)

In Firefox, there are cookie settings: Always, Never, From Visited:

enter image description here

I'm from the program to determine which of these modes is enabled as follows: (Never and From Visited)

Upvotes: 0

Views: 48

Answers (1)

Brian
Brian

Reputation: 5028

If I understood your question correctly, you want to check with JavaScript whether the browser has cookies set. Right?

If so, then a really good way of knowing it is to test it.

Simply set on cookie and then see if you can get it back on your next request. That will tell you what you want.


ADDENDUM

If the user chooses not to accept any cookies or delete them within 1 day, there is nothing you can do through you code. That is on your user. If he/she does not want to save cookies then they should not complain about your product because i.e the automatic login or the autofill will not work.

Upvotes: 1

Related Questions