Jump to content

Recommended Posts

Posted

Hi

I've an annoying minor issue with a site of mine that has a shopping cart. The cart uses sessions to hold customer ID and number of items, and all of the shop area is secure (so the domain reads as server52.xxxxxx.com/~sitename/....etc)

This all works fine, but the problem arises because on all the non-shop pages of the site, I show a "number of items in cart" info box. This gets the item count from a session called number_of_items.

What appears to happen is when the non-shop pages are viewed the url is http://sitename and the session doesn't seem to be available.

I guess this is related to the cookie not being available between domains and it thinks this is a different domain to the secure url.

 

But does anyone know a workaround for this (the option of buying their own certificate is not really there because of cost to the client)

 

thanks

...stu

Posted

Just to add to Andy's reply, this link http://totalchoicehosting.com/help/id95.htm might also help to explain it as well. Secure website and navigating it can be a bit of a mystery if you haven't gone there before from a web design side of things that is.

Posted

Hi guys

thanks for both those replies.

So it seems you are confirming that it is not really possible to pass sessions across from the secure to the non-secure pages.

 

I wonder though - do these problems remain even if you have your own ssl certificate (since the url for unsecure content will be http://sitename and for secure content will be https:// - do the session cookies still see both as different domains?)

...stu

Posted

If it's the same domain, you can pass the session info across, yes.

 

I'd be certain that you want to though ... but yes, it's possible if they are both on the same domain.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...