3 ms·
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 th
by cargo8 14y ago
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.
- robinh 14y agoCould they not set those parameters in a POST request so they don't show up in the URL?
- Madre 14y agoHow possible is it to perform a POST within a GET request?
- robinh 14y agoThat 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?
- candybar 14y agoGratuitous use of POST breaks the back button.
- sturadnidge 14y agoI 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.
- mtrimpe 14y agoIt'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.
- Kop 14y agoYou 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?
- mootothemax 14y agoSo 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.
- zandorg 14y agoI 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&filt=all&pq=test&sc=8-1&sp=-1&sk= 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 "").
- NelsonMinar 14y agoGoogle 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&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 https://www.google.com/url?sa=t&rct=j&q=&esrc=s&...
- NelsonMinar 14y agoHa, 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 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.