Results 1 to 3 of 3

Thread: code to set cookie not working on IE

  1. #1
    Join Date
    Jul 2006

    code to set cookie not working on IE


    i have written this code in order to set a cookie and then make it expire as the user leaves the page:

    <script>document.cookie ='chat=sesion; path=index.php';</script>
    <script language="javascript">
    function clearCookie(){
     document.cookie='chat=;expires=Thu, 01-Jan-70 00:00:01 GMT;';
    window.onunload = clearCookie;
    It works fine on Firefox and Chrome but as usual not on IE (its a piece of shit, you know). Could anybody please recommend me a cross-browser solution?

    Thank you.

  2. #2
    Join Date
    Mar 2009

  3. #3
    Join Date
    Jul 2006
    Thanks but that doesnt answer my question. I need to know why my code is not being accepted by Explorer and how can i fix it because the page you provide just gives out a very basic example but its not what i need.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles