I am trying to use < base> TAG to indicate the source folder containing the media files for my html pages located in separate folder.
I have the
Doesn't have a trailing slash, so it refers to a file called MEDIA_FOLDER
and not a folder. Often you don't notice the difference because web servers will redirect an attempt to fetch folder
to the proper address folder/
, which will then typically return a default document (eg. folder/index.html
). But for relative URL resolution it does make a difference.
target
relative to /folder
is not /folder/target
, it's just /target
. To make it /folder/target
you must let the browser know that the base URL is a folder, by adding a trailing slash:
There is no reason for different browser behaviour here. A place you may find different browser behaviour, though, is if you've accidentally used a Windows-filesystem-style backslash \
instead of /
, so do check for that.