开发者

Discussion on SEO best-practices for site development involving php

Recently in our work, I've started getting some experience with SEO (finally). It's something I've put off for a long time because I've always maintained that SEO is a buzz-word b.s. pseudo-science and more about providing quality, relevant content (assuming proper header tags and the basics are covered). However, sometimes a client doesn't have stellar content yet still demands SEO and high rankings.

While it's not how I design sites 100% of the time (as design dictates structure), I typically create a basic template from the design my boss gives me, then I optimize it, and then strip the top and bottom and move those to header.php and footer.php, using the following to bring in the header and footer based on AJAX versus HTML requests:

<?php if($_SERVER['HTTP_X_REQUESTED_WITH']==''){
include('includes/header.php');
}?>

#content here

<?php if($_SERVER['HTTP_X_R开发者_如何学JAVAEQUESTED_WITH']==''){
include('includes/footer.php');
}?>

Then, I use jQuery to intercept page requests and I use AJAX to fill in, for example, a #copy div with the new content. This avoids unnecessarily loading all the header and footer info everytime, but still allows users without Java to access pages without any problems. (also to think about, depending on size of content, do the extra http requests added using this method render it more of a server strain versus a single, larger file?)

I don't have a really solid understanding of the meta keywords and their SEO significance, but as I recall reading, the keywords, title, and description on a page should match up to the pages content--ie. each page should have slightly different keywords/description while retaining some common ground.

What I'm getting at here is trying to foster a discussion on whether my approach is flawed to begin with, if there are things I can do (within reason) that keep the site structure simple but allow for better SEO practices, or if my SEO understandings are wrong.

This isn't a question, per say, but hopefully a constructive discussion here that more than just I can learn from. I appreciate any responses and hope to hear from you. Thanks!


The search engine crawlers fit the following criteria;

  • They may not be able to see, hear, move, or may not be able to process some types of information easily or at all.
  • They may have difficulty reading or comprehending text.
  • They may not have or be able to use a keyboard or mouse.
  • They may have a text-only screen, a small screen, or a slow Internet connection.
  • They may not speak or understand fluently the language in which the document is written.
  • They may be in a situation where their eyes, ears, or hands are busy or interfered with (e.g., driving to work, working in a loud environment, etc.).
  • They may have an early version of a browser, a different browser entirely, a voice browser, or a different operating system.

Which happen to be the criteria for AAA Accessibility Guidelines so if you follow those you get good SEO too.

Matt Cutts from Google has a good blog and contirbutes to Google's Webmaster Help describing how their ranking algorithm is updated.


Pay attention to URLs, they make a big deal both for SEO and user friendliness. Some reading:

  • Cool URIs don't change (w3.org)
  • URL normalization (wikipedia.org)

Update: I must add – to clarify my opinion about the whole SEO thing – that after you ignore some jibba-jabba from SEO industry (hey, it's their business!), what remains is mostly about good practices (technical, usability), which have existed long before they were given a (marketing) term "SEO": accessible, structured, relevant content under descriptive title & url. Just common sense things, which optimizes for users as well as search engines.


I would completely disagree with almost all of the preceeding comments.

It's perfectly fine to not cater for javascript-free users if they're not your target market. Lets be honest who doesnt have javascript (search engines* and webscrapers).

however google is beginning to crawl ajax: http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html

My advice,

  • make your site as useful to the user as you can
  • subscribe to the google webmaster central blog
  • don't play a catch-up method of seo
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜