Another problem with Cookies.
I use a lot of AJAX POSTs.
In the ProcessRequest method, it is stated that AJAX needs a Cookie . . .
! Ajax requests must have a session ID set in a cookie, otherwise nothing is returned
! This is to prevent Javascript hacking as per http://www.fortifysoftware.com/advisory.jsp
! NOTE: NetTalk uses Rico which is not vunerable to Javascript Hacking, but
If self.RequestAjax = 1 and self.SessionID = 0
! ignore ajax requests that do not include a SessionID in the cookie.
return
End
However, according to Wikepedia, Cookies are only be sent back to the server for the given domain and path.
When I enter my site via
www.xprodin.be - a Cookie is created with path=/.
However, as I have 10000 SEO friendly pages (eg:
www.xprodin.be/ladies/trousers/product1) Google has picked them up very nicely.
When I do a search in Google for "xprodin ladies trousers" it shows my page.
However, clicking to the Google URL for my page, brings me directly to
www.xprodin.be/ladies/trousers/product1.
As this is the first visit to
www.xprodin.be, a SetCookie is done for my new SESSIONID, BUT IN THE PATH=/ladies/trousers/.
That's why I have 5,6,7, ... SESSIONID Cookies.
However, when I go to my order page,
www.xprodin.be/order and start an AJAX order request; my SESSIONID is not send to the server because of a different Cookie path.
No Cookie ==> AJAX does nothing. So my shopping cart doesn't work.
When I enter my site via
www.xprodin.be - a cookie is created in the Path=/ - the same path as my order page ==> hence the SESSION ID cookie is send with the AJAX call and everything works.
My question: who is adding the page=/xxx/yyy stuff when creating my SESSIONID cookie? If all of my 10000 pages created a single cookie with path=/ - this would solve my problem.
But I can't find where to change this.
Maybe this behaviour has to do with my previous thread where SetCookie has 7 parameters in the prototype but use 8 parameters in the code?
regards
Patrick De Laet