Forum Moderators: coopster

Message Too Old, No Replies

Sessions and Bots

In php

         

Ruben

7:19 pm on Oct 12, 2004 (gmt 0)

10+ Year Member



I have made an online shop. At every page I start a session. I know that Google doesn't index these pages when sessions are set. So I included this:

ini_set("session.use_only_cookies")

to force the server to use only cookies.

When i look at my phpinfo() I see the following set:

Directive Local Global
session.use_cookies On On
session.use_only_cookies On Off
session.use_trans_sid Off Off

My site is pretty new. But Googlebot visits reasonably often. Because when I change my title. The next day or two days later it is changed in de SERPS. Only my index page is indexed. Now I'd like to know if the values are set correct so google can index my page completely or is there still a possibility that the start of the session is a problem for googlebot.

mincklerstraat

12:29 am on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



why don't you try:
ini_set('session.use_only_cookies', 1);

ini_set() needs two arguments: the thing that's being set, and the value with which it should be set. 1 usually means on; 0 usually means off. Suprised actually that this didn't throw an error.

ini_set() in php manual [be2.php.net]

Birdman

12:35 am on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Turn cookies off in your browser and surf the site. If you see the long session id after the URL, it's not right.

Ruben

8:08 am on Oct 13, 2004 (gmt 0)

10+ Year Member



Well i had set the 1 there :-) I just typed it wrong.

As you can see, the trans_sid is off , so this means that the long session id isn't after the url.

SofterLogic UK

11:37 am on Oct 13, 2004 (gmt 0)

10+ Year Member



Are the indexed pages containing a session ID?

Ruben

11:53 am on Oct 13, 2004 (gmt 0)

10+ Year Member



Well only the frontpage is indexed. And it doesn't contain a session id. I find it strange that my products aren't indexed. Maybe it will come later. But i want to avoid that my pages can't be indexed because of some stupid action of myself, that i didn't had the configuratyion right.

If i disable all my cookies. The sessionid isn't put after the url. So i have to conclude that this is ok?

Birdman

12:22 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As far as sids are concerned, yes you should be fine. This still doesn't mean that everything else is in order.

A couple other things to check:

1) Proper headers [webmasterworld.com]

2) Valid HTML [validator.w3.org]

mincklerstraat

3:46 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Birdman! Great to know about this, way cool. Had no idea of this feature, and I don't know how many times I've been telling people to go over to delorie or whatever other server header checker. Great that we don't have to send people off-site for this kind of thing.

Note for others - get the firefox webdev extension so you don't have to use on-line services, it's right there for you under 'info'.