Jeff Spall Posted August 30, 2001 Posted August 30, 2001 Hi, I'm having trouble trying to make a cookie persist after the end of a session. I have a very simple line: [FMP-SETCOOKIE: voter=already voted, EXPIRES=30000] it sets fine and works, but expires when the browser is closed. What am I doing wrong??
Keith M. Davie Posted August 30, 2001 Posted August 30, 2001 Your problem raises questions for me. I am not very experienced with cookies aside from I know that they let me re-enter this forum without my having to enter my name and password every visit. They also track other data about my visits. The premise: The above is the way cookies work until I clear my cookies, which I do from time to time. When there are no cookies set I must manually enter my name and password to use this forum as a contributor. No big deal. I gather that since no cookies are set the name and password entry is processed by the database and then cookies are again set. I note Jeff is setting a cookie to show the client has already voted. Now let us assume that the client has voted and subsequently they clear their cookies. Then they return to Jeff's site with no cookies. The questions: 1. Does the "already voted" issue get verified by the database at the time of re-entry to the site when the client has no cookies set? 2. If question 1 is true, why not just handle this as a database function and not use cookies? 3. If question 1 is false, can the client vote twice? 4. What is done about clients who do not want to accept cookies? I know people like that. Are they penalized?
Jeff Spall Posted August 30, 2001 Author Posted August 30, 2001 Hi Keith, here's my reasoning behind the cookie: We want people to go to the site and cast votes for a trade award. Last year, I captured IP addresses to catch multiple votes from the same computer, but this doesn't work for dial-up accounts, so I was going to set the cookie and pass the value as a hidden field when the new record was made, and use it to pass a new record reply page that tells them they've already voted and then discount that vote in the database. This works OK and a few smart users who can delete cookies won't really matter for this, but I can't set the expiry time properly as I'm new to FMP-Cookies. This is a pain as I thought I would crack the whole ******* thing in an afternoon. regards, Jeff
Anatoli Posted August 30, 2001 Posted August 30, 2001 From previous topic: We cannot influence mach of what WC is sending to the browsers, can’t we? I am following standard syntax and I always had problems with cookies-FM-WC-MSIE. Not so much in Netscape. I even redesigned couple of my solutions using cookies to tokens and tokens are 100% reliable. Oh well, one day....
Tyfud Posted September 5, 2001 Posted September 5, 2001 set the cookie expires to "9999" I have had problems using 5 digits or more.
Anatoli Posted September 5, 2001 Posted September 5, 2001 Tyfud that is the best tip on cookies! There is a long thread about cookies started by me and not a single idea like yours. Usually the simplest ideas are the best! Thanks, I will try it again.
Jeff Spall Posted September 6, 2001 Author Posted September 6, 2001 Yeeeeeeeees! It all starts working as soon as I cut down the expiry time. We might note that the example in the FileMaker CDML reference has a time to die of '43200' Thanks, Jeff
Keith M. Davie Posted September 6, 2001 Posted September 6, 2001 Hmmmm. Yet another example from FMI which does not work. Wow. Imagine my surprise. ;-)
Vaughan Posted September 7, 2001 Posted September 7, 2001 I posted to the forums about a year ago asking about this... it was my reason for coming here! I found that any expire value over 44639 minutes makes the cookie go psyco. Unfortunately 44639 minutes is only 31 days which is not enough. But here's the rub: it only happens on NT. If I hosted the site on MacOS the cookies worked OK. This is FMP 4.0v3.
Keith M. Davie Posted September 7, 2001 Posted September 7, 2001 Thanks Vaughan, that is worth knowing.
Anatoli Posted September 7, 2001 Posted September 7, 2001 Following Vaughan's post. Even sites serving from Mac have problems in MSIE on PC and not in NN on the same PC. BTW, John May forum is based on cookies and it is not working for me in MSIE at all. Perfect in Netscape. Served on Mac and Lasso.
Recommended Posts
This topic is 8476 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now