Forum Moderators: open

Message Too Old, No Replies

No cache on non-html pages?

         

Brett_Tabke

6:55 am on Jul 1, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



How does one put a no cache tag on a non-html page that can't be covered by a robots.txt? For example: a robots.txt file.

bcc1234

7:00 am on Jul 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can set the server response header fields, such as Last-Modified, Expires, Date, etc...

Brett_Tabke

8:36 am on Jul 1, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Sorry, I mean "no archive". (eg: don't want google to cache it and in some cases, not index it).

bcc1234

10:51 am on Jul 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I got what you wanted to do, but you can't have an HTML meta tag in a non-HTML file, so the only reasonable thing left to try is to set Expiration to something like Jun-1970 and hope that Google will not index the page.

Also, try to make the file look dynamic with the rest of the fields (maybe setting a cookie for a session id, or something) - that might also scare Google away from it :)

ciml

6:00 pm on Jul 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> Expiration to something like Jun-1970 and hope that Google will not index the page

I'm pretty sure that won't work. I've had pages that continued to be indexed long after they expired.

I don't know about "pragma: no-cache" though. There ought to be a mechanism to do this, IMO.

PsychoTekk

6:14 pm on Jul 1, 2002 (gmt 0)

10+ Year Member



"Pragma" is just an old mechanism with the same effect as "Cache-Control"
i have no idea either...

jdMorgan

1:48 am on Jul 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Brett,

If the plain-old header expiry date won't work for non-HTML files, you might
try appending "no-cache, must-revalidate" to the HTTP headers. I use these
directives in my root directory .htaccess file:

# Set http header cache expiry dates and controls
ExpiresActive On
#
# Default - Expire all pages 1 week from last access
ExpiresDefault "A604800"
Header append Cache-Control: "must-revalidate"
#
# Apply a customized Cache-Control header to frequently-updated pages
<Files test.html>
Header unset Cache-Control:
ExpiresDefault "A3600"
Header append Cache-Control: "no-cache, must-revalidate"
</Files>

Then you can check your files for cacheability with the on-line tool at
[ircache.net...] (not affiliated)

I don't know if Googlebot will take the "no-cache, must-revalidate" as a hint
that the resource should not be cached, but it certainly should.

HTH,
Ji

wasmith

5:53 am on Jul 2, 2002 (gmt 0)

10+ Year Member



Read between the lines and did a search -> Google needs to fix this. bad googlebot! bad bad googlebot!

Key_Master

6:34 am on Jul 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe X-No-Archive: yes [google.com] in the server header would work???

Long shot but may be worth testing.