I have a scenario in which I place a javascript in a website which
calls a java servlet every 5 seconds and sends information about the
page it is in along with other details such as browser etc. etc.. Now
the first time such a request comes, java servlet creates a session
and thereafter tracks all the user response coming from that
javascript in that particular session. Now, on the other end, I have a
javascript which calls the java servlet every 10 seconds and lists all
the sessions. The functionality is that the user is able to track who
all are there on their site as every session is unique and he is able
to determine who all have visited what pages. Now, the problem coming
is some people donot allow setting of cookies (session is a cookie),
so, the problem comes is that every 5 seconds the javascript keeps
submitting information to the servlet and the servlet keeps creating
new sessions every 5 seconds which is wrong. We went around this
problem by checking whether the client end is allowing setting of
cookies. If the client end allows setting of cookies, only then we
send the request to the servlet for creation of sessions. But, we are
stuck in another scenario. In browsers like netscape, I think there is
a functionality that you can allow normal cookies but, not allow
sessions cause we are getting a lot of requests from netscape in which
new sessions keep being made. Any idea how we can stop this from the
client side. Can javascript make sessions and check if they are
created and stop requests from coming to our server. |