the file is not loading from the "cookies". The file get loaded from the relative path of your site.
If you are serving in localhost ad example, it will serve the files from http://localhost/js/file.js.
The problem that you are having of not showing the changes is because your js get cached in the browser, this is a default feature of many browser to avoid users download again an already downloaded file.
As a workaround, you can change the
<script src="js/file.js" type="text/javascript" charset="utf-8"></script>
to something like:
<script src="js/file.js?v=1" type="text/javascript" charset="utf-8"></script>
This will force the browser to load a pristine new copy of the js in question.
Don't forget, at every change on your js, you will have to update the src="js/file.js?v=1" to something like: src="js/file.js?v=2" and so on..
If you are using PHP on you backend, you can use smt like this to generate an always unique link:
<script src='js/file.js?v=<?= time() ?>'></script>
Hope this helps!