code: function resolvePathRelativeURL (absolute, relative) {
    // If there's no absolute URL, then use the current page URL (without query or hash)
    if (!absolute) {
      absolute = stripHash(stripQuery(location.href));
    }
  
    var absoluteSegments = absolute.split('/');
    var relativeSegments = relative.split('/');
  
    // The first 3 segments of the absolute URL are the origin (e.g. "http://www.example.com")
    var origin = absoluteSegments.splice(0, 3).join('/');
  
    // Remove the file name from the absolute URL, so it's just a directory
    absoluteSegments.pop();
  
    // Add each segment of the relative URL to the absolute URL, accounting for "." and ".." segments
    for (var i = 0; i < relativeSegments.length; i++) {
      var segment = relativeSegments[i];
  
      switch (segment) {
        case '.':
          break;
        case '..':
          absoluteSegments.pop();
          break;
        default:
          absoluteSegments.push(segment);
      }
    }
  
    return origin + '/' + absoluteSegments.join('/');
  }
docs: Resolves a path-relative URL, such as "file.json", "../file.json", "../dir/subdir/file.json", etc.
  
  @param {?string} absolute - The absolute URL to resolve against. Defaults to the current page URL.
  @param {string} relative - The relative URL to resolve
  @returns {string}