JavaScript Editor Ajax software     Free javascripts 



Main Page

and also supports the inclusion of the time. ISO 8601 is very nicely described at
http://
www.iso.org/iso/en/prods-services/popstds/datesandtime.html
.
?
<changefreq>
tells Google how often the page changes. The possible values are
always
(for
pages that change with each request),
hourly
,
daily
,
weekly
,
monthly
,
yearly
, and
never
.
?
<priority>
lets you tell Google how you evaluate the importance of individual pages of your
web site as compared to the others. The value is a number between 0.0 and 1.0. Please note that
the
<priority>
element only has significance over the relative importance of pages
within
a
web site, and it
does not
affect the overall ranking of a web site!
Using Yahoo! Sitemaps
Yahoo!’s sitemap protocol is considerably simpler than Google’s protocol. It too supports several for-
mats including news feeds, but the format discussed here is the flat URL list plaintext file. It does not
utilize XML, nor does it ask for any information other than a list of URLs delimited by linefeeds. Yahoo!
requires that a file named
urllist.txt
appear in the root directory of a web site, and that you register
a Yahoo! account with them.
The site must then be added at
http://submit.search.yahoo.com/free/request
. Arguably, Yahoo!
accomplishes some of what Google does with its simpler approach — though it does not accept informa-
tion regarding last modified dates, estimates of update frequency, or the relative importance of the pages.
Yahoo! also cannot be pinged regarding sitemap updates.
The Yahoo! sitemaps equivalent of the previously shown Google sitemap would be a file named
urllist.txt
in the root directory of a web site with the following contents:
http://www.cristiandarie.ro/
http://www.cristiandarie.ro/books/
http://www.cristiandarie.ro/forthcoming/
Like Google, using Yahoo!’s sitemap protocol will not influence a web site’s rankings, but it may get a
site spidered more quickly.
Generating Sitemaps Programmatically
It would be useful to have a library that can create Yahoo! and Google sitemaps programmatically using
the same information. The exercise that follows demonstrates such a library.
You’ll create a class named
Sitemap
, which can store a number of links from your site, and generate the
associated Yahoo! and Google sitemap files for you. (The notion of
class
, as well as the basic notions of
object-oriented programming with PHP, was explained in Chapter 7, when you used it for the first time
in this book.)
203
Chapter 9: Sitemaps
c09.qxd:c09 10:43 203


JavaScript Editor Ajax software     Free javascripts