I'm experimenting with cookies on IE 6.0 and Firefox. AppServer is Jboss 4.0 on the localhost.
I start with page1.jsp: <% Float pi = new Float(3.14); session.setAttribute("pi",pi); %> <a href = "page2.jsp">page2.jsp</a>
page2.jsp: <% Float f = (Float)session.getAttribute("pi"); if(f == null) out.println("Session is dead"); else out.println("pi is: " + f.floatValue()); %>
For both IE and Firefox I block the cookies and this is what I get: 1- session survives in IE (bad, very bad) and the output is "pi is: 3.14" 2- session dies in Firefox (excellent) and output is "Session is dead"
First of all what else do I need to do in IE to block cookies? Secondly where on my hard drive are Firefox cookes saved?
in the third tab from left(i use a turkish browser so i cannot tell what i writes ) in the advanced button on the top frame.(there are two frames)
you can set the cookie options here.
posted 15 years ago
The problem is not how to block the cookies in IE that's straight forward. The problem is that after you block the cookies in "Privacy" tab the session tracking is still on.
After I block the cookies in "Advanced Privacy Settings" window and run my example it still tracks the session, but it shouldn't. When I go from page1.jsp to page2.jsp it should NOT know who I am since the cookie is blocked.
BTW Firefox works fine, as soon as I block the cookie session tracking stops.
Try the example on IE and block the cookies, even with cookies blocked you will be able to track the session.
No "Always allow session cookies" is unchecked. In the Advanced Privacy Settings I've only checked "Override automatic cookie handling" and then selected the "block" choice under both First-party and Third-party cookies.
I'm running my example on Jboss on my machine so if I add localhost as a restriced site in the security tab then session tracking stops.
Thanks for your interest and time.
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad: