3 ms·
In addition to the other comments people have made, relative URLs that start with a slash don't work the way you probably intend them to if you're browsing arou
by Kerrick 4y ago
In addition to the other comments people have made, relative URLs that start with a slash don't work the way you probably intend them to if you're browsing around with file:// paths. For example, a webpage located at /Users/example/Sites/example.com/index.html when loaded with file:// URLs will not find /Users/example/Sites/example.com/style.css if you use <link rel="stylesheet" href="/style.css">. (But you probably want to use "/style.css" rather than "./style.css" because then you don't have to keep track of arbitrary depths of ../ being added for files like /Users/example/Sites/example.com/foo/bar/baz/index.html.)