Reputation: 18753
This question is regarding Google bots and what they actually do with session variables,
here is the question,
My wordpress blog has On/Off radio button when the button is 'On' the posts from category 'abc' excluded when it is 'Off' the posts are included , and by default the posts are 'excluded' which means that, by default the button is 'On'. These On/Off button has also stored in Session so the browser remember the last action of the user.
I want that button to always remian 'Off' only when google crawls my page, is that possible ?
Upvotes: 0
Views: 141
Reputation: 13820
Googlebot won't modify your checkbox value from its default, so you would need to detect Googlebot and modify the default value of the checkbox at that time. To detect Googlebot, just search the HTTP_USER_AGENT
for googlebot
.
Note that it is easy to spoof search engine crawlers, so don't give the crawler any more information than the average person should be able to see.
Upvotes: 1