We are often asked by clients how well our scripts are optimized for search engines. With scripts that use PHP include this is not an issue as all the content is printed directly on the web page. Our PHP Blog script, for example, can be integrated into your website with a PHP include code. It prints all the content within the HTML code of the respective page - just view the source of your web page, and you will see the actual blog post text. So, when Google crawls your website, it will see the content and index it. Using the built-in SEO module, we can make each blog post URL unique (such as "blog-post-title.html").



Scripts that use JavaScript integration, however, work a bit differently. Instead of printing the actual content within the page HTML code, there is only a piece of JavaScript code. Let's see our PHP Shopping Cart script, for instance. If you check the source code of the web page, you will only see a piece of JS code like this:

<script type="text/javascript" src="index.php?controller=pjFront&action=pjActionLoad"></script>

Furthermore, the URL for the web page is like this:


You can see that the primary page file name is "preview.php" and it is always like that, no matter what menu on the shopping cart you navigate to. What changes is the parameter "passed". So, the script uses AJAX calls to show the content you request - product details, shopping cart etc. Back in the past, such AJAX-served content was not indexed, or at least not correctly indexed, by Google. Last year, however, Google announced that they crawl such content now and there is no reason for you to worry about your search engine optimization of scripts like ours using JavaScript integration and AJAX calls. Learn more about this topic on Google's official blog!