Page 1 of 1

Yahoo is indexing .css files

Posted: Sat Dec 16, 2006 8:59 am
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");
?>

Posted: Sat Dec 16, 2006 9:47 am
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.

Posted: Sat Dec 16, 2006 9:50 am
by nickvd
robots.txt

Posted: Sat Dec 16, 2006 9:59 am
by volka
nickvd wrote:robots.txt
That is exactly what's described at http://help.yahoo.com/help/us/ysearch/s ... rp-02.html

Posted: Sat Dec 16, 2006 12:27 pm
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.

Posted: Sat Dec 16, 2006 12:49 pm
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.