Yahoo is indexing .css files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saibot1
Forum Newbie
Posts: 8
Joined: Sat Nov 25, 2006 9:13 pm

Yahoo is indexing .css files

Post by saibot1 »

Ever since I started to parse .css as php in order to use gzip to compress my css files, Yahoo has started to index my css files as well.

In order to prevent this I have researched but cannot distinguish the difference between the following http lines as their definitions are too slight to be able to distinguish between them. What cache-control can I use inside my css files to prevent indexing? Which ones of the below may I leave out / are not needed?

Code: Select all

<?php
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
header("Pragma: no-cache");
?>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

It's unlikely yahoo started indexing you css file just because you let php handle those files.
anyway, take a look at http://help.yahoo.com/help/us/ysearch/s ... rp-02.html

btw: if compressing the css data is your only concern you might be interested in http://httpd.apache.org/docs/2.2/mod/mod_deflate.html as well.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

robots.txt
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

nickvd wrote:robots.txt
That is exactly what's described at http://help.yahoo.com/help/us/ysearch/s ... rp-02.html
saibot1
Forum Newbie
Posts: 8
Joined: Sat Nov 25, 2006 9:13 pm

Post by saibot1 »

I want the css files to be crawled but not indexed. If I use robots.txt, yahoo won't access those files but that could penalize me in ranking since I could be using weird SEO techniques.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

Not exactly... robots.txt files are designed to stop bots from crawling areas of your site you don't want them to have access. Why would you want google/yahoo/et al. to crawl your css files but not index them... seems pointless to me.

If you actually read that link that volka posted, yahoo themselves recommend using a robots.txt file.
Post Reply