Java applet delete browsesr cookies


I have java applet in my website. Sometimes I noticed that after my java applet is loaded - the client loses his cookies. it seamed that the Java applet deleting the cookies....

I am using MindTerm Java applet. Their support said that they not delete the browser cookies in their code.

This scenario disconnect the user from my website.
This problem only occur on Internet Explorer 6.

Who is Participating?
ee_autoConnect With a Mentor Commented:
Question PAQ'd, 500 points refunded, and stored in the solution database.
Hi there;

so we are sure?

If you block the use of cookies on the web in general you need to allow it for your website:

Allow cookies in Internet Explorer:

1.      Tools [menu]
2.      Internet Options& [submenu]
3.      Privacy [tab]
4.      Sites& [button]
5.      Type "" and press Allow [button]
6.      OK until all dialog windows are closed

Allow JavaScript and Java in Internet Explorer:

1.      Tools [menu]
2.      Internet Options& [submenu]
3.      Security [tab]
4.      Internet [Web content zone]
5.      Custom Level& [button]
6.      Under section called "Scripting"
    a.      "Active scripting" set to Enable
    b.      "Scripting of Java applets" set to Enable
7.      Ok until all dialog windows are closed

Best regards...
Cyber-EEAuthor Commented:
All of the configurations are enabled.

The problem still occur....
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

The following link may help

if you wanted to do by code then have a look at bellow snippet


       **  delete a cookie, set the expiration in the past
       java.util.Calendar c = java.util.Calendar.getInstance();
       c.add(java.util.Calendar.MONTH, -1);
       String expires = "; expires=" + c.getTime().toString();
       JSObject myBrowser = JSObject.getWindow(this);
       JSObject myDocument =  (JSObject) myBrowser.getMember("document");
       myDocument.setMember("cookie", expires);

Open in new window

Cyber-EEAuthor Commented:
How is suppose to help me?

I don't want to delete the browser cookie.
I sure that the java applet isn't deleting any cookie.
oops, sorry for that, how about this one
In IE 6, from the Tools menu, select Internet options. Click on the Privacy tab. Then click on the Advanced button
1. Check the Override automatic cookie handling box.
2. Click on the Accept radio buttons for First-party cookies and Third-party Cookies.
3. Check the Always allow session cookies box
4. Click OK twice
now try with your website and let me know if it works
Cyber-EEAuthor Commented:
I already do that...

Still not working....
Cyber-EEAuthor Commented:
Problem solved!!!!

My web application is written in

My cookies defined as HttpOnly Mode.
cookie.HttpOnly = true;

This option disable the document.cookie access in client side under internet explorer.
I removed the HttpOnly limitation from my cookies and suddenly the java applet is working fine.

I don't know why IE6 is deleting the web application's cookies.

All the browsers including IE7 support this HttpOnly feature.

Haapy happy
Joy Joy

thanks you all....
Congratulation Cyber-EE,
                                    Today I add one more tip to my secret knowledge base, thank you for sharing it.
Happy programming,
Really happy for you and i appreciate your effort...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.