referring pure ASP or CGI files

Results 1 to 2 of 2

Thread: referring pure ASP or CGI files

  1. #1
    Join Date
    Dec 1969

    Default referring pure ASP or CGI files

    Is there any way to get the previous referring ASP or CGI script similar to the way you can do it with HTTP?<BR><BR>For example;<BR>if the &#060;html&#062; tag of a previous file was loaded in the browser, on the next file you can retrieve the previous URL/file with either:<BR><BR>VBScript’s: Request.ServerVariables("HTTP_REFERER")<BR>or JavaScript’s: document.location.referrer<BR><BR>But if there’s no HTML in the script, then the previous 2 examples won’t work, and will bypass the previous file until the last file using HTML. In other words you won’t be able to detect the last pure ASP file if it used something like: Response.Redirect(“next-file.asp”).<BR><BR>Anyone?

  2. #2
    Join Date
    Dec 1969

    Default RE: referring pure ASP or CGI files

    It&#039s to do with the Response.Redirect mechanism.<BR><BR>when Response.Redirect is called, the Server sends a &#039 302 Object Moved&#039 message to the browser, which then re-requests the new page. Essentially the browser thinks it&#039s getting the original page - just from a different location - so the referer information is correct when it misses out the page that redirected.<BR><BR>so no, there isn&#039t a way to do that, unless you put a custom querystring onto the end of the Redirect() call<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts