I am trying to understand what is the difference between when I load files/script from the server in my HTML like this:
<script src = "/js/file.js"></script>
And like this:
<script src = "http://example.com/js/file.js"></script>
Assuming that example.com
is my own domain, how will this differ the loading of the file? I mean that will it use cookies to connect to the site or just look for the directory?
I think the second one connects to the server using a cookie, and the first one just retrieves file/script from the folder, making the second method network consuming.