Are you a Google Analytics enthusiast?
More SEO Content
Phpsessid In Url In Ser
Posted 25 October 2005 - 08:43 AM
My site is e-retail, and the shopping cart needs cookies enabled, so I'm not sure I want to turn off the PHP setting for embedding the session id in the querystring because that could potentially cut out users from the site who disable cookies.
I guess my first question should be is does this matter, does it matter that these are showing up in my ser?
There seem to be drawbacks either way I handle this, but what do you think is the general principal for handling this? Leaving it the way it is? Turning it off and notifying users that they need cookies enabled to use the site? Let me know what you think, thanks for your advice!
Posted 25 October 2005 - 09:59 AM
I have the cart Request to set a cookie in the normal parts of the site, as opposed to Requiring that a cookie or Session ID be set.
The idea being that the cart doesn't absolutely need to track state until someone adds something to their cart. At this point then tracking becomes essential.
Are you using one of the commercially available shopping carts? Maybe someone here will have experience with the exact cart you're using and will be able to pass along the settings they use.
Posted 25 October 2005 - 12:24 PM
I don't use any commercial shopping cart package - I'm basically using my own custom built cart that I've been using for years, built upon a foundation I found some time ago with a tutorial, and I've been adding my own components to it over the past few years. It's probably not the best setup, but I'm familiar with it, and I can custom build anything I want and make it look exaclty the way I want. I looked at a few packages but didn't have time to learn the ins n outs of - say - OsCommerce to be able to do the cusomizations I wanted. Anyways....
I guess the first thing I should know is, should I be concerned about this? If it isn't a problem, I'll save myself the time and just leave it. Obviously, I think ideally it would be best to handle it the way you do, but is it really necessary? This isn't my laziness talking, I'm just trying to gauge the priority of doing this....
Posted 25 October 2005 - 12:58 PM
This part isn't a huge issue and should work itself out if there are not any other bad things happening.
Can the spiders get to those individual pages without getting a PHPSESSID variable? Or another way to ask it, is what happens if you disallow cookies and then try to surf your site? Is the PHPSESSID getting automatically added to every link?
If something like the above is happening, it's going to be a problem. Without trying, you'd basically be making a huge spider trap. No matter how many pages they spidered they would always have new pages to spider because of the PHPSESSID always being different. That's a bad thing, and will eventually cause the spiders to back away from spidering your site.
Posted 25 October 2005 - 01:49 PM
When I turn off cookies on the client machine, it's weird, some links have the session id added, some don't. But, it looks like all links created relative to the root include the session id, while links that are created all the way back to http://... don't have it.
And, just to make things even MORE confusing, I have Mod_rewrite on, so the PHPSESSID querystring added to the end gets stripped off once you get to the page anyways... SO, I am going to try just to make all the links created from the base http:// and I am hoping that solves my issue before I get too confused here. Thanks!
Posted 25 October 2005 - 02:17 PM
Posted 25 October 2005 - 02:18 PM
So, you're saying in my pages BEFORE someone tries to add something to the cart, I should request this session ID be set, and then once they try to add something to the cart, then the session ID must be required? And then every page after that will include the session id in the querystring I assume, so that I'd also need to make sure the robots to not spider my "add to cart" page, right?
I'm not overly familiar in how to do this in PHP, I'll look into it, but anyone here have any suggestions? Thanks again.
Posted 25 October 2005 - 02:21 PM
I would seem to think it has something to do with the fact that an absolute link doesn't necessarily mean the destination is on the same server - thus it doesn't append the session ID because it only appends it to links on the same domain. I don't think it actually checks to verify that the domain is still the same with absolute links, wheras a relative link is known to be on the same server...
Just my 2 cents
Posted 25 October 2005 - 05:03 PM
Typically those links are set up as part of a FORM tag. Spiders don't submit forms, so you're safe on that count simply from using a form submit to add anything to the cart.
That's the point that I set the cookie or SID. Add something to their basket and they get one or the other. Once they have it, every other page just checks to see if a session variable exists in the URL string. If it does, all URLs on the page get one appended to the end.
Posted 26 October 2005 - 04:09 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users