"Tony" <To*****@yahoo.comwrote in message
news:Og**************@TK2MSFTNGP03.phx.gbl...
I've searched the web & can't find an answer to this.
Is it possible to successfully use Response.AddHeader for a robots meta
tag?
For example, I want to do
<%
IF request("PageID") = 252 THEN Response.AddHeader "robots", "noindex"
:
%>
It looks like you're confusing response headers with the HTML "head"
section; the two are entirely unrelated.
The response header is the data block sent back to the browser by the web
server which passes things like the result code, cookies, etc., and which
you never get to see (unless you're doing "raw" browsing with something like
SamSpade or Lynx).
The HTML "head" section is actually simply a part of the HTML stream, which
the server pays no attention to as a separate entity from the "body" or any
other part of the stream. It's this location that you'll need to add your
"robots" directive to, as a meta tag (you'll find plenty of references to
the "robots" meta tag using Google).
- Bob.