javascript - Delete cookie by name? -


how can delete specific cookie name roundcube_sessauth?

shouldn't following:

function del_cookie(name) {     document.cookie = 'roundcube_sessauth' +      '=; expires=thu, 01-jan-70 00:00:01 gmt;'; }  

and then:

<a href="javascript:del_cookie(name);">kill</a> 

kill roundcube_sessauth cookie?

in order delete cookie set expires date in past. function be.

var delete_cookie = function(name) {     document.cookie = name + '=;expires=thu, 01 jan 1970 00:00:01 gmt;'; }; 

then delete cookie named roundcube_sessauth do.

delete_cookie('roundcube_sessauth'); 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -