im publishing my web site on Aruba server.
I have this (simplified):
<!DOCTYPE html>
<head>
<meta http-equiv="expires" content="-1" />
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<title>My website</title>
<script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script>
</head>
<body>
<script type="text/javascript" src="http://localhost/mywebsite/js/jquery.MultiFile.js"></script>
</body>
</html>
Testing this on remote and local environment works perfectly.
The problem arises whenever i change the “localhost” src-path (inside the body tag)for a remote one (absolute or relative same issue..the js script doesnt work)
<script type="text/javascript" src="/web/htdocs/www.mywebsite.com/home/js/jquery.MultiFile.js"></script>
Am I missing something obvious??
p.s. the files both in local and remote are the same
thanks
Luca
The problem is that
/web/htdocs/www.ejoin.it/home/js/jquery.MultiFile.jsisn’t a well formed URL (i.e.: it doesn’t begin withhttp://,https://,file://, etc.) and hence it’s being ignored by the browser.Remember – it’s the browser that loads the JavaScript includes – this doesn’t happen on the server-side, hence you can’t meaningfully use a server-side directory path.