Current location: Hot Scripts Forums » General Web Coding » JavaScript » Delete cookies regardless of case.


Delete cookies regardless of case.

Reply
  #1 (permalink)  
Old 11-08-03, 08:05 AM
AussierulesOK AussierulesOK is offline
New Member
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Delete cookies regardless of case.

Hello all, my first post here.

I've checked the threads to make sure this problem hasn't been addressed here yet and after pulling out most of my hair, I'm on my knees requesting help with JavaScript Cookies.

I'm able to read/write them and add whatever variables I need.
My problem is with the Domain.

Cause of the problem...
My site is called aussierulesok.com, however, AussierulesOK.com works as well. I've been guilty of leaving url's posted with both upper and lower case versions. Therefore some visitors are ending up with 2 cookies - one for each. The upshot is the browser doesn't read either of them correctly.

Question.
Is it possible to delete all cookies from a domain regardless of the upper/lower case spellings before writing a new one? I've tried using .toLowerCase(); but haven't been able to make it work as yet.

Any help most apprecieated.
Cheers, AOK
Reply With Quote
  #2 (permalink)  
Old 11-08-03, 10:15 AM
AussierulesOK AussierulesOK is offline
New Member
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
OK, I've found out how to define a path and domain. My cookies now don't have www in the server column, and I'm setting them using this code....

SCRIPT LANGUAGE=JAVASCRIPT>

function setCookie(){
var Team = "Saints";
var the_name = Team;
var the_cookie = "myTeam=" + escape(the_name) + ";" ;
var the_cookie = the_cookie + "path=/;";
var the_cookie = the_cookie + "domain=aussierulesok.com;";
document.cookie = the_cookie;
}

setCookie();
</SCRIPT>

I'm now fumbling around trying to delete them. I should be able to work it out but don't hesitate to drop me a safety line.

Cheers, AOK
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MOHAA Server Query - ASP Stealth Website Reviews 1 11-27-04 10:38 AM
i know how to delete a file! but how to delete a directory? forcer JavaScript 3 01-28-04 07:00 AM
Short Command Line Based Item Order Program digioz C/C++ 20 12-27-03 08:17 PM
Can't seem to get the cookies to the cookie_jar benny666 Perl 1 10-28-03 04:54 AM
select & delete mysql queries superman PHP 2 07-20-03 03:08 AM


All times are GMT -5. The time now is 11:20 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.