Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to send a visitor to this page:

http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=6920927181221

But if there is no referrer to http://www.google.com, the functionality I'm feeling lucky doesn't work.

Do you have any idea how to do so?

share|improve this question
    
So you want to redirect the user to the first google match on a specific search term? –  salle Oct 16 '09 at 5:49
2  
Or alternatively, maybe you can use "Let me google that for you": lmgtfy.com –  Arjan Oct 16 '09 at 9:56
    
As for the original title, "How to open an URL in a browser with a refer(r)er page?": you really can't do that without hacking the browser (or without proxying the result through your own server). So, I've changed the question for future reference. (Especially as that button seems to be disappearing from the new Google homepages.) –  Arjan Oct 16 '09 at 10:14

1 Answer 1

up vote 4 down vote accepted

Put this on the end:

&sourceid=navclient

So that your URL is like this:

http://google.com/search?btnI=I%27m+Feeling+Lucky&q=6920927181221&sourceid=navclient

For example: Stack Overflow, which when clicked will have the HTTP REFERER header set to http://superuser.com/questions/56021/[...]. The same link sent through email, or when opened using right-click » Open Link in New Window, will have no REFERER set at all (in most browsers). All seem to work fine.

share|improve this answer
    
Am deliberately not creating it as a link. –  random Oct 16 '09 at 6:21
    
Ok, thank you very much, it works well. –  Natim Oct 16 '09 at 6:33
    
Note that Google is changing the URLs. This might keep working forever, or a long time, or maybe will fail sooner than we think. See stackoverflow.com/questions/1122523/… –  Arjan Oct 16 '09 at 9:58
1  
I initially thought the question was about sending a link through email or whatever (having no REFERER at all), and actually I'm a bit surprised that this also still works when using ANOTHER referrer, like when linked from another site. But: you're right, it does work. I've added a safe link to Super User as an example. –  Arjan Oct 16 '09 at 10:27
1  
This seems to be sensitive to the query. The example query works, but for some other search queries, it still gives the results page instead of redirecting to the first result. It's not clear to me what separates the two scenarios. –  Cheetah Mar 12 '13 at 14:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.