Problem deleting cookie

I have a Login servlet that creates a cookie and when I log out I want my Logout servlet to delete it. I created the cookie easily but I am having trouble deleting it. I thought all I had to do was create another cookie with the same same and then set its max age to 0 but that doesn't seem to be working.

I just don't get it. My code is below if you have suggestions.
var allcookies = document.cookie;
//var allcookies2 = document.cookie;
var pos = allcookies.indexOf("counter=");
//var pos2 = allcookies2.indexOf("counter2=");
if(counter>1)
document.getElementById('button').style.visibility = "visible";
if(pos != -1)
     var start = pos + 8;
     var end = allcookies.indexOf(";", start);
     if(end == -1)
     end = allcookies.length;
var counter = allcookies.substring(start, end);
     counter = unescape(counter);
if(counter==1)
document.getElementById('button').style.visibility = "hidden";
counter=counter+1;

Similar Messages

  • I have a major problems with foxfire bugs/ glitches on my windows XP and with windows vista. I cannot get to sties it wont let me get through. I am frustrated and tried deleting cookies still have the same problem. How do I fix this?

    I try to go to my Hotmail email and it wont let me go through. so I deleted cookies and still the same issue with my home page. It will not go to home page it just goes to a blank page. I do not want to constantly deal with this problem. You have bugs and everything else in this browser. Please work out the bugs.
    Thanks

    That may be an incompatibility between Hotmail and Firefox 10.
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • ZZXC the problem started when I defraged and deleted cookies

    Ok I figured out that I can access my hotmail from internet explorer. Which is very lucky as I have paid to hear a lecture and the ticket number was in my account . The problem started just after I had defraged and cleaned out my cookies. Which was your suggestion to blank screen when trying to access hotmail .. So before I touched the clean out the cookies working fine. Then no access. I tried turning the computer off leaving it for an hour, coming back on ... Nothing no access at all with Firefox. But like I said ok in internet Explores.. This makes no sense to me. I am not technically minded . but I do know how to clean out my cookies and defrag my machine .
    So thank you ZZXC for your time and thank you for trying to solve teh problem but no luck .. Still have the problem. I tried to reply to you using the same page as your solution but it will not let me do that.

    "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    If clearing the cookies doesn't help then it is possible that the file ''cookies.sqlite'' that stores the cookies is corrupted.
    You can rename (or delete) '''cookies.sqlite''' (cookies.sqlite.old) and delete '''cookies.sqlite-journal''' and '''cookies.txt''', if they exist, in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] in case cookies.sqlite got corrupted.
    See [[Cannot log in to websites]] (Remove corrupt cookies file) - See also http://kb.mozillazine.org/Websites_report_cookies_are_disabled (Other Solutions)
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Vine.co can not watch videos on other browsers do not have the problem with firefox firefox there just did not work, delete cookies, history

    vine.co can not watch videos on other browsers do not have the problem with firefox firefox there just did not work, delete cookies, history

    I think this problem may be caused by Yahoo's changes making it incompatible with the klatest version of FireFox.
    This is suddenly affecting many many people who use Firefox and are members of Yahoo Groups. All these people say they themselves changed nothing and have not been locked out before when using Firefox. But suddenly, within the last week, they are.
    What did Mozilla do or what did Yahoo do to cause this problem? I can say that I was not blocking cookies and after trying a number of things to fix it, I went to Yahoo's home page and navigated to my group from here.
    This problem is not anything a user did. Either Firefox is at fault or Yahoo is. I want to know which company is at fault and when they are going to fix it.

  • Can you help me with problems from latest update of Safari and ITunes.  I can no longer delete cookies as I once did, because the security tab no longer displays the show cookies option. Can anyone please help?

    I can no longer show or delete cookies from my MacBook Pro, since installing the latest update of Safari and Itunes..  Previously, I went to the security tab and clicked on the show cookies option, then opted to delete..  That option has now diappeared and a completely different security tab appears.  The tab does not show a cookies option anywhere.
    Also, I can no longer see a list of my software applications without opening system profiler.
    Sure would appreciate your help.  Thanks.

    Safari's cookies is broken, either intentionally or it's a bug.
    You can search the forums for
    safari cookies lion
    and turn up plenty of threads.
    If you need control over your browser cookies and other aspects of your web browser, I suggest you install Firefox.
    https://www.mozilla.com/en-US/firefox/fx/

  • Firefox no longer loads home page or deletes cookies. I have repeatedly checked both settings and they are correct. It always goes to the last page I was on when I closed the browser ..

    Firefox no longer loads home page or deletes cookies. I have repeatedly checked both settings and they are correct. It always goes to the last page I was on when I closed the browser .

    Go to '''TOOLS''' then''' OPTIONS''' then in '''GENERAL''' panel in '''STARTUP '''session choose '''Show my home page''', then click '''OK''' to save it, exit firefox and restart-it.
    see for more info: [https://support.mozilla.org/en-US/kb/Options%20window%20-%20General%20panel Options window - General panel]
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • I can not open the privacy icon in the options to delete cookies, why?

    I am trying to individually delete cookies, When I go to "tools" then "options" the window will open and I click on the "privacy" icon, the program will highlight the "privacy" icon, but the options for privacy will not appear. The rest of the icons will open and function properly, Has my computer been hijacked?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Why is the number of earlier visits so high in the security tab of the certificate information window when visiting a https protected site(in my case 13.400) even after deleting cookies?

    When you go to www.gmail.com and I rightclick on the gray coloured "google.com" showed left next to the address bar then it shows you the certification details. Whe you click on "more info" and then go to the security section it show you how many times you visted the site before. In my case it say`s none, but thats not the case with my friend, his nuber of earlier visits says 13.400 even after deleting cookies/history.
    Can someone tell me what this means, and if maybe someone other than himself is watching his email because he`s a bit worried now.

    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.com/kb/Bookmarks+not+saved#w_places-database-file

  • Has anyone ever encountered a "shockwave player error" window when deleting cookies in Safari preferences under privacy?

    This window appears multiple times whenever I try to delete cookies. This afternoon, on the amazon.com site, the window kept opening and would not allow me to do anything else. I had to shut down my iMac and restart several times before I could get it working again. I have had this problem for a couple of years now(even when I was running previous operating systems). What is the deal here, and can it be fixed?

    I was having the same problem after updating to the Safari 5.1.2 and noticed, also, that the cookies wren't really clearing... after opening preferences again (after clearing them), there would be a few that would be added back.
    I think it's all related to a cookie issue that started with the safari update.
    I went back to Safari 5.05 using Pacifier as it wouldn't install under Leopard 10.6.8 which I am running.

  • Firefox won't delete cookies even after set to clear cookies on firefox exit

    I have use custom settings for remembering history in firefox.
    I set to clear history on firefox close. Under this settings, I set to clear cookies, active login and cache. But whenever firefox exits it doesn't remove cookies.
    Also, I set to keep cookies till firefox closes. Still the cookies appears.
    This is a big security issue for me..When I click restore previous session, firefox restores the login into sites also which I don't want

    Got It!!!
    Go To: Firefox/Tools/Options/Privacy/Tracking Checked box/Tell websites I do not want to be tracked/ History Firefox will: Never Remember History/ You may also want to: clear all current history/ Clear now/ click OK, ---> got it, that is your answer.<-- (Right click the left image below to open in a new tab)
    And it is my answer as well, as I was confounded with this problem for some time. Now after you do this close your Firefox browser, and open back up Firefox browser, and there will be maybe only one or two cookies, depending on your browsers' home page.
    I tried other methods to get rid of persistent cookies that would not delete by, CookieKiller, and TACO Targeted Advertising Cookie Opt-Out, those did not help, and I tried the methods listed on these links but they did not work:http://webdevwonders.com/clear-dom-storage/
    Also this method did not work:http://justplainobvious.blogspot.com/2009/03/firefox-wont-delete-cookies.html
    Next to make your Firefox browsing possible, go to/Firefox/Tools/Options/Privacy/,Tracking Checked box/Tell websites I do not want to be tracked, History Firefox will: Use custom settings for history, unchecked box Always use private browsing mode, unchecked box Remember my browsing history, unchecked box Remember download history, unchecked box Remember search and form history, checked box Accept cookies from sites, checked box Accept third party cookies, Keep until: I close Firefox, checked box clear history when Firefox closes, /settings all nine boxes checked/ click --->OK! (Right click the right image below to open in a new tab)
    All Cookies are gone/history/deleted.

  • Deleting Cookies from Servlet

    hi
    i am working on JDeveloper 11.1.2.3
    i made a servlet filter and it works well but the problem is in the cookies ... i tried to delete the cookies from the servlet but in vain
    i uses this code but it does not work
    cookie.setMaxAge( 0 );
    Thanks

    Hi,
    Check
    http://stackoverflow.com/questions/3466267/problem-removing-cookie-in-servlet
    http://stackoverflow.com/questions/9821919/delete-cookie-from-a-servlet-response

  • Safari won't delete cookies.

    I know this has been asked before but it doesn't seem to me that it's ever been resolved.
    Safari is version 6.0.5 on Lion 10.7.5. If I try to delete cookies, within a few minutes a lot, but not all of them re-appear. I want to get rid of them because I've noticed that if I visit some sites, then others, all of a sudden ads, sometimes slooooow running ads with video.
    Side note to any advertisers: Being obnoxious and stalking people isn't exactly endearing me to your products.
    I don't seem to see the same problems with FireFox, SeaMonkey, or Chrome, although I rarely use Chrome well enough to be sure. I also have an old laptop PPC running Leopard, and I've noticed that when I kill the cookies on it they're gone.
    Is there a resolution to this?
    Thanks.

    When it comes to cookie management on Safari ...  much better off using another browser.
    It's been discussed here extensively.
    Older versions of OS X such as Leopard. Cookies are not handled the same as in recent Safari versions.
    Apple - Apple's Use of Cookies
    You can send feedback to Apple here.

  • What are benefits and drawbacks of deleting cookies?

    I see articles about how to delete cookies and problems that seem to relate to having cookies or having deleted cookies but nothing (that I could find) about the benefits and drawbacks of cookies. Seems before deleting or preventing, it would be useful to know more about the subject.

    Cookies have many uses, for a summary of what cookies are used for see [http://en.wikipedia.org/wiki/HTTP_cookie HTTP cookie - Wikipedia]
    It is very much a personal preference as to whether you want to delete cookies or not, the wikipedia article should help you decide. As a matter of routine I do not delete cookies, though I do block most tracking cookies.

  • Can't delete cookies

    After installing the latest Safari and Itunes updates, I can no longer see or delete cookies.  The security tab no longer displays the option "show cookies".  It doesn't mention cookies at all.
    Also, after installing the update, I can no longer see a list of my applications without opening system profiler.
    Does anyone else have this problem?  What can I do now?  Thanks for any help you can give. 

    Safari>Preferences>Privacy>Details.

  • Suddenly, Firefox seems to have stopped deleting cookies and browsing history at close, although that is what I have always had selected, and selections haven't changed.

    I have always had Firefox set up to delete cookies and history at close. I noticed today that it doesn't seem to be doing so.
    I can shut down and restart, and still see prior history, and cookies are apparently still there.
    The functionality has always been that if I'm in an email account like gmail, and I close Firefox, I have to log back in when I return. I noticed today that when I restart Firefox, I don't have to log into gmail, I'm still logged in, even though I didn't tell gmail to remember my info (and even if I did, that cookie should be gone). I don't think it's a gmail problem, because other browsers still seem to work correctly.
    Thoughts?

    Hey, these are the instructions on how to try safe mode. Please post back with your results.
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    *In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

Maybe you are looking for