referrer

How can I determine if the document.referrer is from my own site?

爷,独闯天下 提交于 2019-12-17 16:34:37
问题 Each time a page is requested I get the referrer of the page it came from. I need to track just referrer from other sites, I don't want to track going from one page to another within my site. How can I do that? 回答1: document.referrer.indexOf(location.protocol + "//" + location.host) === 0; 回答2: Originally posted at JavaScript - Am I the Referrer? When someone comes to our website for the first time, we store the referrer in a cookie. This way, if they download our demo, we can get the

JavaScript window.location does not set referer in the request header

泄露秘密 提交于 2019-12-17 07:14:36
问题 I understand relying on Referer in the request header is not right. But my question is, why IE does not set Referer to the Request Header if I use window.location ? Any thoughts or fixes? This does not set Referer in the Request header : function load1() { window.location = "https://" + serverURL + "/path/folder/page.aspx"; } <a href="javascript:load1()">Link 1</a> While this sets : <a href="https://hardcode.server.url/path/folder/page.aspx">Link 1</a> 回答1: Your post title shows that you want

How to test android referral tracking?

老子叫甜甜 提交于 2019-12-17 02:52:25
问题 I'm implementing some code to do my own referral tracking on downloads from the Android market. See Android referral tracking does not work for an idea of what my app is doing. How can I test if this code is working before deploying to the public? 回答1: The easiest way is using adb . You don't have to write any code. Just run in a terminal : adb shell am broadcast -a com.android.vending.INSTALL_REFERRER -n <your.package>/.<path.up.until.your.BroadcastReceiver> --es "referrer" "utm_source=test

Replace an img src value based on a referring URL's query string

点点圈 提交于 2019-12-13 21:17:35
问题 I have a Magento store and I would like to replace the src value of an img based on whether the referring URL contains a specific querystring or querystring value (adnetwork=as) and if not simply leave the image as it is. Is this simple enough to do, I've searched everywhere for the answer, and even asked on various forums to no avail. Here's what I have so far, seems like the correct syntax, just Firebug reports that it is unable to load the image URL, and it simply shows "". The paths are

get referer of website that is requesting your js file

喜欢而已 提交于 2019-12-13 18:16:28
问题 I have an embed script that simply does this: document.write(unescape('%3Cscript src="' + mp_protocol + 'blah.cloudapp.net/js?location="' + window.location +' type="text/javascript"%3E%3C/script%3E')); As you can see right now the URL of the webpage that is embedding the code is passed in using window.location. But this can easily be edited by the client. I wanted to know if I can get the referrer instead of passing the url. I wasn't sure if referring info would be passed since this script is

Link Referrer in HTML

六月ゝ 毕业季﹏ 提交于 2019-12-13 08:56:24
问题 I want to ask a quetion about rel property of a tag in HTML (actually, HTML5 if that will make any difference) I'll continue with example domain names. My website is example.com. I've a link to this page at example2.com. If I give this link with something like <a href="example.com" referrer="referrer.com">Click me</a> will my referrer be referrer.com or example2.com? BTW is there anything possible like that code? Giving a random referrer? 2nd one, because I think subjects are similar. Is it

Web API - Detecting Client Domain

别说谁变了你拦得住时间么 提交于 2019-12-13 06:41:40
问题 I am building a bunch of Web Services using C# and the Web API. The services will be accessible from multiple web apps, and multiple native apps. The application manages a list of authorized domains, and a list of authorized app ID's (to be used with native apps). I am looking for a way to detect the domain a web app is being hosted on, so that I can compare that domain name against my list of authorized domains. So far, the only properties I can find in the request context are properties

set referrer header using query string on apache configuration

匆匆过客 提交于 2019-12-12 09:04:56
问题 I need to take a parameter from the query string and set it in the referrer header in the Apache configuration file. Do you know if this is possible? I'm able to do the same with the cookies but I need to do it using the query string. setEnvIfNoCase ^Cookie$ "(referrer=\w*:\/\/\w*)" HTTP_MY_COOKIE=$1 setEnvIfNoCase HTTP_MY_COOKIE "(http:\/\/.*\.\w*)" REFERRER=$1 RequestHeader set Referer %{REFERRER}e Regards 回答1: The solution was quite simple. setEnvIfNoCase or setEnvIf can't use the query

How to redirect and/or delay depending on referrer?

我是研究僧i 提交于 2019-12-12 02:52:56
问题 I want to allow traffic to my site only from a certain referring URL like "example.com/123". I want the rest of traffic to be redirected to the same referring URL after a particular delay, say 1 or 2 minutes. I want the traffic that comes from example.com/123 not to be referred anymore. I thought of using something like this but I have no clue how to edit to meet my requirements: <?php $referrer = $_SERVER['HTTP_REFERER']; if (preg_match("/site1.com/",$referrer)) { header('Location: http:/

Find the referring URL and parse it

空扰寡人 提交于 2019-12-12 02:33:30
问题 Okay my problem is there are two websites with two different servers. What I'm trying to do is write some of the buttons for website 1, but on a page on my server (website 2). So to do this the approach is User clicks on button from website 1. User is redirected to website 2. I need to know what page they came from so I know what product they are looking at. Which will be done by getting the referrer URL. I then need to parse the URL's productID's number. example URL: website1.com