I have a document located at http://localhost:8081/develop
.
The index.html
, located at http://localhost:8081/develop/index.html
contains the following:
<html>
<head>
...
<link rel="stylesheet" href="./styles.min.css">
<script src="./bower_components/jquery/dist/jquery.js"></script>
<script src="./bower_components/moment/min/moment-with-locales.js"></script>
<script src="./bower_components/elessar/dist/elessar.js"></script>
<script src="./bower_components/EventSource/eventsource.js"></script>
...
</head>
<body>
...
</body>
</html>
ALL of the files starts with a ./
, telling the browser that it should search them in the current directory, for example: <script src="./bower_components/jquery/dist/jquery.js"></script>
should resolve into http://localhost:8081/develop/bower_components/jquery/dist/jquery.js
. That's obvious.
But it doesn't. Instead, they are being resolved into http://localhost:8081/bower_components/jquery/dist/jquery.js
, throwing tons of errors in the console.
The same thing will happen if instead of using ./
in the beginning of the files, I'd remove the first slash: <script src="bower_components/jquery/dist/jquery.js"></script>
also resolves into http://localhost:8081/bower_components/jquery/dist/jquery.js
.
It feels like a very basic question but I really need that those files have relative paths and that those paths works as expected. So why aren't them?