473,405 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Response.Addheader

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"
:
%>

Jun 27 '08 #1
8 8675

"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.
Jun 27 '08 #2
"Bob Milutinovic" wrote:
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).
On a side note, you can add a [Headers] tab to the [Page Info] window in
Firefox, by adding the "Live HTTP Headers" extension:
https://addons.mozilla.org/en-US/firefox/addon/3829

In addition, you can use the extension to capture a log of all[1]
request/response headers, and use its "replay" feature to tweak your request
headers before re-submitting a request (this includes all headers and even
POST body content).

[1] You can filter out immaterial request info, such as image and css
requests

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Jun 27 '08 #3
"Bob Milutinovic" wrote...
>
"Tony" wrote ...
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.
No, I'm afraid that you are confused.

What you are discussing is correctly called the HTTP Headers, not the "response
headers".

>
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).
Duh.

You can modify some HTTP meta response by adding comments within the <HEAD></HEAD>
section.

My original question, is do search bots bother to read the HTTP headers for a robots
name/content pair.


Jun 27 '08 #4
"Tony" wrote...
:You can modify some HTTP meta response by adding comments within the <HEAD></HEAD>
section.
Sorry spellcheck.

That should have read:
You can modify some HTTP meta response by adding CONTENT within the <HEAD></HEAD>
section.


Jun 27 '08 #5
"Tony" wrote:
My original question, is do search bots bother to read the
HTTP headers for a robots name/content pair.
You might just as well ask if they bother to read the META tag versions.
When we went through the process of selecting a search appliance for our
internal servers, several vendors confessed to us that they do not obey such
tags.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Jun 27 '08 #6
"Tony" <To*****@yahoo.comwrote in message
news:ek**************@TK2MSFTNGP05.phx.gbl...
"Bob Milutinovic" wrote...

"Tony" wrote ...
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.

No, I'm afraid that you are confused.

What you are discussing is correctly called the HTTP Headers, not the
"response
headers".
The term HTTP Headers is general term to the set of headers defined in the
HTTP spec. Some HTTP Headers only have meaning as part of the Request phase
of a HTTP session, some only have meaning in the Response phase and a few
can be used both in the request and the response.

When refering to HTTP headers that are sent as part of the response we tend
to use the phrase 'Response Headers'. The Response.AddHeader is a method in
ASP we use to add such 'Response Headers'.
>

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).

Duh.

You can modify some HTTP meta response by adding comments within the
<HEAD></HEAD>
section.

My original question, is do search bots bother to read the HTTP headers
for a robots
name/content pair.
The actual header you are after is X-Robots-Tag :-

Response.AddHeader "X-Robots-Tag", "noindex"


--
Anthony Jones - MVP ASP/ASP.NET
Jun 27 '08 #7
"Anthony Jones" wrote...
:
My original question, is do search bots bother to read the HTTP headers
for a robots
name/content pair.

The actual header you are after is X-Robots-Tag :-

Response.AddHeader "X-Robots-Tag", "noindex"
Ah HA!

And I found a wealth of new information when I searched for "X-Robots-Tag"

THANKS, Anthony!!!

Tony

Jun 27 '08 #8
Gazing into my crystal ball I observed "Tony" <To*****@yahoo.com>
writing in news:ek**************@TK2MSFTNGP05.phx.gbl:
My original question, is do search bots bother to read the HTTP
headers for a robots name/content pair.

The well behaving bots do honor noindex, nofollow within a Meta tag in the
Head element. Some, including Google, also honor rel="nofollow", good if
you want to have a link to an outside host, but do not want SE to follow
it. You will also, if you have not already done so, want make use of a
robots.txt file [www.robotstxt.org/].

Understand that misbehaving bots will ignore all your efforts.

There are helpful people at alt.internet.search-engines that-a-way --->

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jun 27 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Craig Haywood | last post by:
Hi there, Can anyone please give me an actual example in code on how to add a header for the "HTTP/1.1 202 (Accepted)" response code I have searched the web high and low and all I can find is...
2
by: Joseph | last post by:
Hello. I have this problem. See I have a transformed XML file and I checked its contents prior to outputting it to excel file via responseset. here is the gist of the code: XmlReader reader =...
0
by: S.Kartikeyan | last post by:
I read previous posts in the group regarding Response.AddHeader("content-disposition","filename:somefilename"); My aim is to send a file from aspx page with some file name. when the page is...
4
by: Adam Beer | last post by:
I have a visual basic app that contains a IE browser control and I am using C#.NET to create dynamic content to be displayed within the IE control. The app parses the URL for commands, but I've run...
0
by: PD | last post by:
I am trying to stream out a PDF file via the response object and when I execute the code it always brings up the first document that I pulled up.Even when I step through the code, I can see the new...
1
by: Sridhar | last post by:
Hi, I am trying to display a pdf file on the web. It is working fine but the Page_Load method is running twice before displaying the page. Here is the code that I am using Private Sub...
6
by: john | last post by:
The standard method to transmit a file from an aspx page to a browser is to stream the file to the response then end the response. The HTML code generated by the aspx page is discarded, and the...
1
by: Andyza | last post by:
With reference to the ASPFAQ 2161 article - http://classicasp.aspfaq.com/general/how-do-i-prompt-a-save-as-dialog-for-an-accepted-mime-type.html Does the 'Content-Disposition' code work if the...
2
by: Michael D. Ober | last post by:
When I single step through the code below, it sends back the PDF file that is retrieved in the line fm.GetAccountPDF(...). When I run without single stepping, I get the master page for this page. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.