News for hackers. Stuff that matters.
Re:URLs are for People, not Computers by cargo8 on Friday April 05, 2013 @09:30AM (#5498261)
While I do appreciate clean URLs, the reason behind all those random obfuscated query parameters in Google's url is not a mystery. They are hidden indicators that are only available at query time and/or experimentation flags and things like that to improve the results. URLs only need to be readable for the portion that the user inputted or is consciously aware of, the rest is for computers.
Re:URLs are for People, not Computers by NelsonMinar on Friday April 05, 2013 @10:29AM (#5498607)
Google search result URLs used to be simpler, but they made a decision not to care how they look years ago and they keep stuffing more and more data into them. I assume it helps their tracking and maybe optimization.

Even more offensive are the result URLs on the result page. Here's the URL for a logged out search for "hacker news". https://www.google.com/url?sa=t&rct=j&q=&esrc=s&...

Re:URLs are for People, not Computers by NelsonMinar on Friday April 05, 2013 @10:31AM (#5498623)
Ha, the Hacker News page won't even display the URL, it's so ugly. Let's examine it in its full glory

https://www.google.com/url?

sa=t&

rct=j&

q=&

esrc=s&

source=web&

cd=1&

cad=rja&

ved=0CDMQFjAA&

url=https%3A%2F%2Fnews.ycombinator.com%2F&

ei=k99eUcfzOsePiAKjgIG4DA&

usg=AFQjCNGxnV8qCnv_rujodDj6o2ZhqU8Nxg&

bvm=bv.44770516,d.cGE

Note that none of this is necessary for clickthrough tracking; it's easy to do that separately from the href.

Re:URLs are for People, not Computers by Kop on Friday April 05, 2013 @09:34AM (#5498281)
You get that long and obscure URL while visiting google logged out, with no cookies.. So they all must be the defaults.

If they are the defaults, why put them in the URL?

Re:URLs are for People, not Computers by mootothemax on Friday April 05, 2013 @09:51AM (#5498390)
So they all must be the defaults... If they are the defaults, why put them in the URL?

You've probably answered your own question there.

Re:URLs are for People, not Computers by zandorg on Friday April 05, 2013 @12:23PM (#5499357)
I found this recently with a 6-field form. The browser sends empty FORM fieldstrings.

Eg: http://www.bing.com/search?q=test&qs=n&form=QBLH&...

Here, sk is "".

You can strip out empty fields with a bit of PHP (creating a new URL without the empty strings), which seems to work okay, but it's probably best not to risk the wrong effect, which is the end program seeing the empty fields wrongly (as NULL and not "").

Re:URLs are for People, not Computers by robinh on Friday April 05, 2013 @09:32AM (#5498274)
Could they not set those parameters in a POST request so they don't show up in the URL?
Re:URLs are for People, not Computers by Madre on Friday April 05, 2013 @09:44AM (#5498340)
How possible is it to perform a POST within a GET request?
Re:URLs are for People, not Computers by sturadnidge on Friday April 05, 2013 @09:51AM (#5498387)
I presume robinh means why not set all those additional params when the search form is posted rather than the initial get.

EDIT: Ok the follow up comment doesn't indicate that... but it would be just as valid to do it that way if they are indeed search modifiers.

Re:URLs are for People, not Computers by robinh on Friday April 05, 2013 @09:50AM (#5498383)
That was what I was trying to ask: can you do both, or would that be absurdly impractical/impossible? Alternatively, can't they do only a POST and somehow generate URLs dynamically based on the search query?
Re:URLs are for People, not Computers by candybar on Friday April 05, 2013 @10:29AM (#5498608)
Gratuitous use of POST breaks the back button.
Re:URLs are for People, not Computers by mtrimpe on Friday April 05, 2013 @10:07AM (#5498478)
It's perfectly possible to POST to a URL with GET query parameters.

For Google though I'm not sure you'd want POST requests at all; unless it's to set cookies and do a redirect on POST.