[Tutor] Query String
eryksun
eryksun at gmail.com
Tue Feb 19 12:35:24 CET 2013
On Tue, Feb 19, 2013 at 4:14 AM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
> https://www.google.co.uk/#hl=en
Just to clarify, using a fragment (#) like that isn't a standard
query. It's a JavaScript trick for manipulating browser history based
on location.hash, so one can do AJAX page refreshes without breaking
the back button. You can see the actual query URL ('.../search?hl=en')
if you view the background GET (e.g. in the Firefox web console).
urlparse.urlsplit parses 'hl=en' as the fragment in this case:
>>> urlparse.urlsplit('https://www.google.co.uk/#hl=en')
SplitResult(scheme='https', netloc='www.google.co.uk', path='/', query='',
fragment='hl=en')
More information about the Tutor
mailing list