[HN Gopher] URL Explained - The Fundamentals
       ___________________________________________________________________
        
       URL Explained - The Fundamentals
        
       Author : signa11
       Score  : 44 points
       Date   : 2023-11-13 12:23 UTC (10 hours ago)
        
 (HTM) web link (ittavern.com)
 (TXT) w3m dump (ittavern.com)
        
       | mattpallissard wrote:
       | I've pointed many, many, new hires at the URL Wikipedia page.
       | 
       | https://en.m.wikipedia.org/wiki/URL
        
       | codepoet80 wrote:
       | > It is recommended to place IPv4 and IPv6 addresses into
       | brackets:
       | 
       | I tried doing this, and my brower(s) just assumed it was a search
       | string, and took me to my search engine. Does that mean they're
       | not following the RFC? (section 3.2.2 of RFC3896) Should I file a
       | bug with Mozilla?
        
         | SethMLarson wrote:
         | The post is incorrect, only IPv6 addresses are meant to be put
         | in brackets.
        
           | codepoet80 wrote:
           | You are correct, reading the RFC just a little further than
           | my ctrl+f found:
           | 
           | > A host identified by an Internet Protocol literal address,
           | version 6 [RFC3513] or later, is distinguished by enclosing
           | the IP literal within square brackets ("[" and "]").
        
           | recursive wrote:
           | And in that case, the square brackets are not only
           | recommended; they are required.
        
       | deathanatos wrote:
       | There are ... a few errors in the post?
       | 
       | > _Scheme: (always present, not always visible)_
       | 
       | Schemes are required by the URI/URL's grammar. I'm not entirely
       | sure what "always present, not always visible" even _means_ ...
       | those would seem to be synonyms. Perhaps we could infer  "not
       | always visible" to mean that there's some implied default ... but
       | there's not, not for a URI/URL. (For a relative-ref, yes.)
       | 
       | > _Path: (always present)_
       | 
       | ... but this blows our implied default theory above out of the
       | water. Paths are not always present: "https://google.com" is a
       | valid URL, with no path. (One could say it implies "/", but ...
       | see the above.)
       | 
       | > _It is recommended to place IPv4 and IPv6 addresses into
       | brackets:_
       | 
       | It is definitely not "recommended" ... it's malformed to put IPv4
       | addresses in brackets, and it's mandatory for IPv6 addresses.
       | 
       | Just read the RFC? https://datatracker.ietf.org/doc/html/rfc3986
       | 
       | > _Host: (always present, not always visible)_
       | 
       | I'm trying to think of how you could have a URL without a host
       | "visible". The network location is like the defining feature of a
       | URL, vs. a URI.
       | 
       | But if a URI lacks a host, it's not just "not visible", again,
       | there's no implied default there. "Host" might not even make
       | sense, depending on the scheme.
        
         | johnny22 wrote:
         | maybe it just meant that the scheme isn't visible in the
         | address bar in a browser like chrome.
        
       | 6510 wrote:
       | Fragment identifiers are not sent to the server.
       | 
       | query example should have both ? and & like
       | ?foo=1&bar=2&baz=3
       | 
       | Perhaps behind the path/to/whatever have a /filename.XXX
       | 
       | Also, the story on the www "subdomain" is missing.
        
       ___________________________________________________________________
       (page generated 2023-11-13 23:01 UTC)