title: What's the difference between URL.standardized and URL.absoluteURL?
body: <p>In Swift's <code>URL</code> class, there are <a href="https://developer.apple.com/reference/foundation/url/2293170-standardized" rel="noreferrer"><code>.standardized</code></a> and <a href="https://developer.apple.com/reference/foundation/url/1780323-absoluteurl" rel="noreferrer"><code>.absoluteURL</code></a> properties (<a href="https://developer.apple.com/reference/foundation/nsurl/1411073-standardizedurl?language=objc" rel="noreferrer"><code>.standardizedURL</code></a> and <a href="https://developer.apple.com/reference/foundation/nsurl/1414266-absoluteurl?language=objc" rel="noreferrer"><code>.absoluteURL</code></a>, and <a href="https://developer.apple.com/reference/foundation/nsurl/1414302-urlbystandardizingpath?language=objc" rel="noreferrer"><code>.URLByStandardizingPath</code></a> in Objective-C's NSURL). There's also <a href="https://developer.apple.com/reference/foundation/url/2293229-standardizedfileurl" rel="noreferrer"><code>.standardizedFileURL</code></a>.</p>
  
  <p>I have no idea what the difference is between all these, but there must be one since they provide all of them, right? I mean clearly the <code>.standardizedFileURL</code> is meant to only deal with file URLs, but other than that (for instance, if all are called on a file URL), <strong>what's the difference?</strong></p>
  
  <hr>
  
  <p>From the above-linked docs: </p>
  
  <h1>Swift</h1>
  
  <blockquote>
    <h2>standardized</h2>
    
    <p>Returns a URL with any instances of “..” or “.” removed from its path.</p>
  </blockquote>
  
  
  
  <blockquote>
    <h2>absolute​URL</h2>
    
    <p>Returns the absolute URL.</p>
    
    <h3>Discussion</h3>
    
    <p>If the URL is itself absolute, this will return self.</p>
  </blockquote>
  
  
  
  <blockquote>
    <h2>standardized​File​URL</h2>
    
    <p>Standardizes the path of a file URL.</p>
    
    <h3>Discussion</h3>
    
    <p>If the <code>is​File​URL</code> is <code>false</code>, this method returns <code>self</code>.</p>
  </blockquote>
  
  <h1>Objective-C</h1>
  
  <blockquote>
    <h2>standardized​URL</h2>
    
    <p>A copy of the URL with any instances of ".." or "." removed from its path. (read-only)</p>
    
    <h3>Discussion</h3>
    
    <p>This property contains a new <code>NSURL</code> object, initialized using the receiver’s path with any instances of <code>".."</code> or <code>"."</code> removed. If the receiver does not conform to RFC 1808, this property contains nil.</p>
  </blockquote>
  
  
  
  <blockquote>
    <h2>absolute​URL</h2>
    
    <p>An absolute URL that refers to the same resource as the receiver. (read-only)</p>
    
    <h3>Discussion</h3>
    
    <p>If the URL is already absolute, this property contains a copy of the receiver. Resolution is performed per RFC 1808.</p>
  </blockquote>
  
  
  
  <blockquote>
    <h2>URLBy​Standardizing​Path</h2>
    
    <p>A URL that points to the same resource as the original URL using an absolute path. (read-only)</p>
    
    <h3>Discussion</h3>
    
    <p>This property only works on URLs with the file:​ path scheme. For all other URLs, it returns a copy of the original URL.</p>
    
    <p>Like <code>string​By​Standardizing​Path</code>, this property can make the following changes in the provided URL:</p>
    
    <p>Expand an initial tilde expression using <code>string​By​Expanding​Tilde​In​Path</code>.
    Reduce empty components and references to the current directory (that is, the sequences “//” and “/./”) to single path separators.
    In absolute paths only, resolve references to the parent directory (that is, the component “..”) to the real parent directory if possible using <code>string​By​Resolving​Symlinks​In​Path</code>, which consults the file system to resolve each potential symbolic link.</p>
    
    <p>In relative paths, because symbolic links can’t be resolved, references to the parent directory are left in place.
    Remove an initial component of “/private” from the path if the result still indicates an existing file or directory (checked by consulting the file system).</p>
    
    <p>Note that the path contained by this property may still have symbolic link components in it. Note also that this property only works with file paths (not, for example, string representations of URLs).</p>
  </blockquote>