Jump to content

Http_referer Not Working In Ie


johnnyg24

Recommended Posts

I'm trying to hide certain elements on a page IF a user just came from a specific page. I am trying to use ServerVariable("HTTP_REFERER") to store the previous page's URL.

<input id="referingPage" type="hidden" value="<%=Request.ServerVariables ("HTTP_REFERER")%>" />

I then use some RegExp and Jquery to determine if it the previous page meets the criteria.

$(document).ready(function() {var str = $('#referingPage').val()	var lookFor = /sales/gi	sales = lookFor.test(str)	if(sales){		$('#sidenav').hide()			}})

It works well in FF,Chrome and Safari but not IE.Can anyone tell me why?

Link to comment
Share on other sites

If IE doesn't send the referer then there's nothing you can do about that. There are some situations where browsers do not send a referer, or else it is up to the vendor's choice or options set by the user. You may have the referer disabled in IE. Some firewalls or security software will also strip the referer headers.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...