Conversation started Nov 16, 2013 at 1:42.
Nov 16, 2013 01:42
Hey. Question for everyone. Do you know why Google uses long URLs with always tons of GET variables? Surely not to annoy users.
@Ariane you mean query parameters?
http://google.com?iAmAQueryParameter=v&meToo=z
can anyone help me? If A is hermitian matrix and if A^3 = I, then must A be I?
@Hennes I mean that my search's URL ends up as this:

https://www.google.ca/search?q=My+search&ie=utf-8&oe=utf-8&rls=org.mozilla:fr:official&client=firefox-a&gws_rd=cr&ei=pc2GUqqFE4a92wWkkYGAAw

when it could be this:


https://www.google.ca/search?q=My+search

(And typing that gives the exact same result)
@Mark Eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeh. Maths Stack Exchange site?
i just wanted a quick help with that
(And of course the url isn't "google.ca/...", blame the chat's system)
I'm sorry, I don't think I've ever learned what a hermitian matrix even is.
Nov 16, 2013 01:45
@Ariane consider that the alternative is to have the parameters submitted in the HTTP body, which would definitely simplify the URL, but would then mean that if you copied and pasted the URL from the address bar, as users are wont to do, someone else might not see the same results as you do with fewer or no parameters
Quz chat, it is clippy helpful
@Mark ask on math.stackexchange.com or the Mathematics chatroom; that's very off-topic for here
You need to avoid its "help" with [Full url is this](Full url is this)
Nov 16, 2013 01:46
@allquixotic Command idk learned
!!tell 12200160 idk
@allquixotic: XD
i shamelessly steal funny pictures and teach them to cavil
this is what i do
Nov 16, 2013 01:47
its also very useful ;p
What insanity is a bunny with a pancake on her head? And why isn't she drinking from a saucer of coke?
since I don't need to look it up
@allquixotic Well the most common solution is to use POST rather than put stuff in the HTML body... but I mean, those variables are that I use Firefox and I use UTF-8 and stuff. Passing this URL info to someone else is actually counter-productive, because I'm betting the reason they pass that info into a variable is that it's important for their page display to give me the page in French and in UTF-8 and formatted for my broqwser because it's ME.
@Ariane the other query parameters are basically little details that give Google enough information to display the page exactly as you see it to someone else who clicks that URL; the only thing the URL does not provide is any way for them to log in as your Google account... that much is sent by a cookie, not in the URL
@allquixotic Yeah I can figure that, but however is it remotely useful to give someone a link for Firefox if they use IE or Chrome? At best I don't see any use, at worst it could cause display issues.
And most importantly I have trouble believing that they didn't see that it's more of an inconvenience than anything else when you link something to someone and the link takes almost the whole Skype chat window. :/
Nov 16, 2013 01:50
@Ariane I guess they could theoretically stuff the browser and encoding variables into the HTTP body, but they don't want to make it so that users can only search by submitting a POST request, because any time you click someone's link you're issuing a GET request.... I suppose they could process the variables either in the URL string or in the HTTP body
but then, you'd end up with inconsistent results: see, a search from the google.com homepage where you click the button could very well plausibly issue a POST request, but when you execute the search function in every browser that I know of, it always submits a GET request, and the convention is that HTTP GET requests typically do not have a body
can a GET have a body? sure.... at a bitstream level nothing is preventing it... but the convention is for them to not
heh.
I just took 5 attempts to remember to download a cd to test something....
Eh. I dunno anything about deep stuff like that. I just don't like how it's deeply anti-ergonomic to put in the URL variables that the user doesn't need to know.
there may be some proxies or browser implementations or web server implementations that read "GET" as the HTTP method, and immediately upon realizing that fact, don't even attempt to read (resp. write) an HTTP body
if that were the case, you wouldn't be able to search properly without physically visiting google.com first then clicking the button
Eh?
google.com/s=my-search&search_critera[...]
Uhm, but what I'm arguing is that there's little purpose in giving out UTF-8 and Mozilla:fr in GET.
eh it was /search?q=my-search but you get it.
OK -- Google wants to know your character encoding, your user agent, and some other thing ("ei") that I don't know what it is -- right? now, they can get this information in one of two ways: either in the URL query string, or in the HTTP body. now, if we assume that providing an HTTP body alongside a GET request is potentially problematic, then it stands to reason that we have to use POST. however, browser search helper implementations for IE, FF and Chrome all use GET. Do you see the issue?
so it's either (a) Google doesn't even attempt to solicit those extra parameters at all from your browser, or (b) they eliminate the ability to do searches from the search helper in the top-right in Firefox, or typing into the address bar in Chrome or IE
Nov 16, 2013 01:56
You make it sound like you can't use GET and POST at the same time.
you can't -- not within the same HTTP request
if you are making one HTTP request, you must choose one method to supply with that request -- either GET or POST, but not both
you can of course interleave POSTs and GETs in separate requests, but this is one request we're talking about
because a search is fundamentally one request -- one URL click
.... o.o I've always been doing it.
<form method="post" action="page.php?get_variable=something">
<input name="post_variable" value="something" />
<button type="submit">Submit</button>
</form>

...I'm guessing there's something I don't understand.
@Ariane that will submit one POST request when you click the submit button, with URL parameters -- but just because you have URL query parameters doesn't mean it's a GET request
Eeeeeh. They show up in $_GET in PHP, so to the best of my knowledge it's GET? ._.
I mean, if I can do it, why can,t Firefox do it? Regardless of the deep background stuff.
the HTTP request method is specified at the start of the HTTP message at the transport layer; if the HTTP request were a plain text file, it'd look something like this:

GET /page.php?get_variable=something HTTP/1.1
Cookie: something=value
User-Agent: something
Other-Headers: etc.


//the http body, which can be anything
see that "GET" at the start? that is either GET or POST; but you can't say, for example, "GET|POST" or "GET AND POST" or something like that
the problem I was referring to earlier is that some software might already be coded so that, as soon as it reads that "GET", it stops reading the request after the newline after the HTTP headers, and doesn't even attempt to process the body
Nov 16, 2013 02:02
Yush, but why not POST then? Everyone reads the content of POST and its URL too, right?
so if you don't want to risk breaking that software, you can't put a body with a GET request, so then you'd have to use a POST -- but, based on the way that browsers are currently implemented, the search function does GET, not POST.
@Ariane Right. Everything will indeed read both the query string and the HTTP body of a POST. But the problem is still getting existing software to submit POSTs when for years it's been written to GET.
They'd have to submit a bug report to Mozilla, and Microsoft, and Opera, and Apple, and Chrome, and say "Google search is changing to POST, you'll need to patch your code"
and then people with old browsers are SOL
Well there's always the option of handling both kinds of requests. But Google is so centered on speed I'm guessing they wouldn't want that. I mean, look at the source of the Google main page. x.x A nightmare.
Google is pushing HTTP/2 anyway, which will change a lot of things about the foundations of how the web works
they already have something approximating it called SPDY, but HTTP/2 may end up being either very similar or quite different to SPDY
I don't know what HTTP/2 or SPDY are. :/
@Ariane SPDY is... speedy
they also have QUIC: en.wikipedia.org/wiki/QUIC
Nov 16, 2013 02:06
HTTP 2.0 is the next version of the HTTP protocol... it's currently in the middle of being standardized, so you can't go out and learn how to use HTTP 2.0 today
the term is really meaningless until the specification is finalized
If I'm not mistaken HTTP2 is a copycat, not pun intended, of SPDY...
because a lot can change
@Braiam the draft they chose to start with as a baseline is a copy of SPDY.
but they have more than a year to tweak it
HTTP 2.0 isn't due to be finalized until some time in 2015
@allquixotic eww... a standard baked and served in less than a year... ewww
@Braiam well, SPDY is already pretty mature, so it's not like it's totally new and untested; that said, they could still end up changing it so that it's not compatible with SPDY
@allquixotic Wait what? HTTP 4 became outdated long ago because of XHTML 1, and then HTML 5. What's up with those messed-up version numbers?
Nov 16, 2013 02:08
@Ariane you're confusing HTTP (aitch-tee-tee-pee) with HTML (aitch-tee-em-ell)
@Ariane thats HTML
LOL
http is the transport layer
er, no actually
its the protocol layer
@allquixotic read that aloud... if you can! D:
I DID have a tiresome day, apparently. Don't mind the retard.
Nov 16, 2013 02:08
HTML, XHTML and HTML5 are presentation layers.
@JourneymanGeek trasport layer is TCP...
heck it could be a transponder and everyone will be still in awe how it works...
@Braiam: I have the attention span of a squirrel in a nut-shop today, so forgive me
I do web application security testing at work, so I pretty much stare at HTTP requests and responses all day (some days...) -- I'd say I work at least as much at the HTTP layer as I do at the HTML layer.
 
Conversation ended Nov 16, 2013 at 2:10.