Re: how gmail hide http referrer?



*** nokiamobile escribió/wrote (Fri, 28 Mar 2008 07:12:51 -0700 (PDT)):
anyone know how gmail hide http referrer when a link in email is
clicked?
[...]
Is it possible in php?

The referrer information is sent automatically by the browser and as far as I know nothing you can do in a server-side language like PHP can change that.

As about Google, it seems the JavaScript code they use to open links has the side effect (on purpose or not, who knows) of making browser believe that it's not appropriate to send the referrer header.

A very quick look at the code shows that they create a document in a new Window and insert a META tag in it to force redirection:


OpenExtLink = function(a,b,c){
try{
var d=BR(c.href);
if(d.toLowerCase().indexOf("mailto:";)==0){
Tv(d);
return false
}
if(Gl){
Wb(a,d);
return false
}else{
if(Gw){
c.blur();
if(b.ctrlKey){
return true
}
}
var e=Wb(a,"");
e.document.write('<META HTTP-EQUIV="refresh" content="0; url='+B8(d)+'">');
e.document.close();
return false
}
}catch(f){
Gd(f)
}
}


But of course, now it's off-topic :)



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com
--
.



Relevant Pages

  • Re: java enabled browser detection with PHP
    ... >>Is there a way to detect with php if the clients browser is ... >>I don't want to use javascript code to do this job. ... > only other thing you could do is to pass a parameter to a php script using ... but it does return if a browser is able to use java applets. ...
    (alt.php)
  • Re: [PHP] Pop up window in PHP code
    ... PHP neither supports nor fails to support JS. ... Use "View Source" in the browser and see what you've done. ... The javascript code works perfect with other pages and within HTML, ...
    (php.general)
  • Re: (OT?) form question
    ... PHP does everything it has to do on the server, ... PHP can send to the browser JavaScript code capable of doing what you ... want, but it's the JavaScript code that would be performing cursor tricks in the browser, ...
    (php.general)
  • Re: Protecting a whole directory - PHP Authentication
    ... you must be aware that you won't be able to use a custom login form if you use HTTP authentication. ... there's no way to tell the browser what to send for authentication credentials except through the HTTP authentication mechanism (i.e. no PHP or Javascript code can force it). ...
    (comp.lang.php)
  • Re: interactive buttons question
    ... All the JavaScript code associated with the Interactive Buttons is ... Then preview in browser to check the buttons. ... > I've put interactive buttons on this website and while the colors of the ... > font change in the preview panel, they don't change on the website once ...
    (microsoft.public.frontpage.client)