2 ms·
There's either 4 or 6 combinations (depending on whether you consider the domain-only case separate from path or not): www.example.com + /
by Izkata 2y ago
There's either 4 or 6 combinations (depending on whether you consider the domain-only case separate from path or not):
www.example.com + /images/foo.jpg -> www.example.com/images/foo.jpg
www.example.com/static/ + /images/foo.jpg -> www.example.com/images/foo.jpg
www.example.com/static/index.html + /images/foo.jpg -> www.example.com/images/foo.jpg
www.example.com + images/foo.jpg -> www.example.com/images/foo.jpg
www.example.com/static/ + images/foo.jpg -> www.example.com/static/images/foo.jpg
www.example.com/static/index.html + images/foo.jpg -> www.example.com/static/index.htmlimages/foo.jpg (naive and wrong)
-> www.example.com/static/images/foo.jpg (extra work)
They were referring to the difference between the 5th and 6th (probably didn't notice it was an absolute path), you're referring to the first 3 together vs the others.
- afavour 2y agoInteresting, I’ve never run into that. In the last example I’d just do www.example.com/static/index.html + ./images/foo.jpg