Including content in index file by using php or ajax for search optimization

Go To StackoverFlow.com

0

I have been designing a website for the past few days and I realized I may be using the wrong format to code the website.

I generally would use in the index.php (this is simple for dicussion)

<?php 
require("header.php");
include("home.php");
require("footer.php);
?>

I can use this for setting up an easy layout where I do not need to rewrite the code over again for a new page.

Or sometimes I would use a variant of that to have it point in the link i wanted.

A friend of mine told me this is not a good way to have pages load because of searching for google and such.

I'm wondering if I have to somehow use Ajax and writing codes according to googles crawling system (I'm really confused about)

2012-04-05 00:46
by Kyle Monti
As per qitch's answer, Google's crawling system has no awareness of the server side code - Greg Pettit 2012-04-05 00:56
A friend of yours was pointing you in the opposite direction. As already stated, Google would be unaware of how the page was rendered by PHP, but only aware of the final output. Conversely, unless they have evolved, they wouldn't parse the AJAX at all and whatever you fill in via ajax would be invisible to Google. I have heard that Google is starting to parse some JS, but I wouldn't count on it for SEO - TecBrat 2012-04-05 02:47


2

PHP is run serverside when the page is requested so it will have already run when a client is able to view the page. Whatever you output with the php will be what is seen, not the actual php.

2012-04-05 00:49
by qitch
Exactly. The browser has no idea how the html was created; it just gets the final result - John W 2012-04-05 00:55
Why would someone state that using php load sequences, for instance; a function to make each link a variable and having it load those pages just plain text would effect crawling of a website. Would a crawler still be able to notice the other pages behind the seen like '/?page=1'. I was reading you need a #! in ajax calls and use a html shot of the page and robot.txt to be able to dedicate person search optimization - Kyle Monti 2012-04-05 02:21
Ads