Jump to content

Deleting cookies..?


jackpf

Recommended Posts

Hi all,

Having a bit of a problem allowing users to log off on my site. It works fine in all browsers, except IE8 and safari.

 

Basically, all I'm doing is expiring the cookie with the following code:

setcookie('jackpf_user', '', -100000, '/', '.jackpf.co.uk');
setcookie('jackpf_admin', '', -100000, '/', '.jackpf.co.uk');
setcookie('jackpf_security', '', -10000, '/', '.jackpf.co.uk');

 

This works for most browsers, and the cookies are deleted, but for IE8 and Safari, the cookie still exists, but has the value "deleted", so people are logged on as "deleted"...

 

I was just wondering if there was a better way of making sure cookies are deleted? I haven't found anything on google...

 

Anyway, thanks for any help,

Jack.

Link to comment
Share on other sites

Well no, they're not actually logged in as "deleted", only their cookie says they are. I have security which checks everything against the database, so someone with this cookie would not actually be able to view anything restricted.

 

I'm simply concerned about people not being able to log out properly. I just don't understand why it's not deleting the cookies on some browsers...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.