473,387 Members | 3,750 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,387 software developers and data experts.

How do I clear the "Referer" header?

Is there way to modify the "Headers" collection of the HttpRequest class?
Basically, I need to somehow clear the "Referer" header.

Any ideas will be much appreciated! Thanks!
Nov 18 '05 #1
4 2869
I belive you can't.

Karl

"Milan Negovan" <Milan Ne*****@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
Is there way to modify the "Headers" collection of the HttpRequest class?
Basically, I need to somehow clear the "Referer" header.

Any ideas will be much appreciated! Thanks!

Nov 18 '05 #2
You could try the

myWebHeaderCollection.Remove("whatever") method.
--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Milan Negovan" <Milan Ne*****@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
Is there way to modify the "Headers" collection of the HttpRequest class?
Basically, I need to somehow clear the "Referer" header.

Any ideas will be much appreciated! Thanks!

Nov 18 '05 #3
Milan Negovan wrote:
Is there way to modify the "Headers" collection of the HttpRequest
class? Basically, I need to somehow clear the "Referer" header.

Any ideas will be much appreciated! Thanks!


Why would you want to do this? Your application code is the only code that
will see this property, thus being able to change it would have zero effect.

Cheers,
--
Joerg Jooss
jo*********@gmx.net

Nov 18 '05 #4
You can rebuild the header but you will need to learn how to use
HTTP Modules and HTTP Handlers. What you will be doing is
using the module to intercept the request. The handler will rebuild the
header and finish resolving the request.

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"Milan Negovan" <Milan Ne*****@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
Is there way to modify the "Headers" collection of the HttpRequest class?
Basically, I need to somehow clear the "Referer" header.

Any ideas will be much appreciated! Thanks!

Nov 18 '05 #5

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

Similar topics

9
by: deko | last post by:
I have a page that I don't want anyone to be able to link directly to. The page should only be accessed from gatepage.php. I tried this code, but keep getting errors - "header info already sent",...
14
by: Good Man | last post by:
Hi There A client of mine has some banner ads placed on the net. Instead of relying on the sites the ads are posted on tell us how many clicks they are getting, we wanted to track the number...
9
by: Nicolae Fieraru | last post by:
Hi All, I try to use Request.ServerVariables("HTTP_REFERER") in a script and I discovered it doesn't work as expected. I use XP with SP2 and I created a link on a web site which points to an asp...
9
by: David D. | last post by:
Does the file extension matter when including a JavaScript file in an HTML page? Normally, one would include a JavaScript file in an HTML page using <script src="foo.JS" type="text/javascript">...
5
by: mike | last post by:
regards: Does each HTTP Request have "Referer:" header? Any positive suggestion is welcome. thank you May goodness be with you all
10
by: cppdev | last post by:
Hi All! I want to clear the string contents from sensitive information such as passwords, and etc. It's always a case that password will appear as string at some point or another. And i feel...
2
by: TR | last post by:
In an "Abandon Changes" button on my UserPreferences.aspx form, I'd like to redirect back to the page the user was on before coming to the UserPreferences form. It could be any one of my web app's...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
3
AnuSumesh
by: AnuSumesh | last post by:
Hi, I have created two web pages say first.asp and second.asp. first.asp has a link of second.asp and username is embedded in url of second.asp.(second.asp?username=dvhsdghsdg) Second.asp has...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.