Question
What is wrong with Request.ServerVariables("HTTP_REFERER")?

Answers

The situations where this servervariable works include the following methods of a browser loading a URL:
n A straight HTML
n A form submit (POST or GET) using a submit button or
n A form submit (POST or GET) using JavaScript
The situations where it doesn't work:
n A link from Favorites
n A click on 'Home' or a Link with a defined URL
n A JavaScript location.href or location.replace()
n A page linked from HierMenus (details)
n Typing the URL directly in the browser
n Launching a clickable URL from an e-mail or Word document
n Using Response.Redirect / Server.Transfer
n Using Response.AddHeader or to redirect
n Loading the URL with XML (see Article #2173)
Obviously, this variable cannot be relied upon for many situations.
Here is the code I used to test with. Ref.asp contains the following code:
<%
response.write "Referer: " & request.servervariables("http_referer")
%>
And ref.htm contains the following:
<%
Response.AddHeader "Refresh", "10;URL=ref.asp"
' interchanged with the version:
%>
http-equiv='refresh'
content='10;URL=ref.asp'>








href='ref.asp'>Go

there - straight link


href='#'
onclick='window.location.href="ref.asp";return false;'>Go
there - javascript href


href='#'
onclick='window.location.replace("ref.asp");return false;'>Go
there - javascript replace


href='#'
onclick='document.getform.submit();return false;'>Go
there - javascript GET


href='#'
onclick='document.postform.submit();return false;'>Go
there - javascript POST

You'll notice that in Netscape 4, the referer is translated properly in all cases. With this exception, I think we're all
glad, overall, that the number of users with Netscape 4 is quickly diminishing! :-)
  Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q Five executives of European Corporation hold a Conference in Rome Mr. A converses in Spanish & Italian Mr. B, a spaniard, knows English also Mr. C knows English and belongs to Italy Mr. D converses in French and Spanish Mr. E , a native of Italy knows French 16. Which of the following can act as interpreter if Mr. C & Mr. D wish to converse a) only Mr. A b) Only Mr. B c) Mr. A & Mr. B d) Any of the other three 17. If a 6th executive is brought in, to be understood by maximum number of original five he should be fluent in a) English & French b) Italian & Spanish c) English & French d) French & Italian
  • Q What’s short for “binary digit”?
  • Q Explain about obj-list-view method?
  • Q Why is necessity not the mother of invention in evolutionary terms?
  • Q What KEWORD is used to withdraw the PRIVILEGE you have granted to other user ?
  • Q Which key word is used to perform unconditional branching?
  • Q Who broke Bearings bank and inspired the film Rogue Trader
  • Q Describe the reproductive systems of Cockroach.
  • Q The remuneration of the entrepreneur in production is
  • Q Is a measure showing the number of dependents (aged 0-14 and over the age of 65) to the population (aged 15-64). (A)Dependency ratio (B)Demographic ratio (C)Debt to equity ratio (D)None of these
  • Q How can you read a request header information