Side navigation
Ticket #6034: getScript_bug.html
File getScript_bug.html, 0.3 KB (added by bhasden, February 05, 2010 08:36PM UTC)
This html file demonstrates the issue. No matter where the file is located in the website it should always request http://localhost/path/to/script.js. The bad behavior comes in when the file is located in a directory underneath the root. IE8 will continue to request the appropriate file while FF3.5 disregards the base tag and requests the script relative to the page url.
<html>
<head>
<base href="http://localhost/" />
</head>
<body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
$.getScript("/path/to/script.js");
</script>
</body>
</html>
Download in other formats:
Original Format
File getScript_bug.html, 0.3 KB (added by bhasden, February 05, 2010 08:36PM UTC)
This html file demonstrates the issue. No matter where the file is located in the website it should always request http://localhost/path/to/script.js. The bad behavior comes in when the file is located in a directory underneath the root. IE8 will continue to request the appropriate file while FF3.5 disregards the base tag and requests the script relative to the page url.
<html>
<head>
<base href="http://localhost/" />
</head>
<body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
$.getScript("/path/to/script.js");
</script>
</body>
</html>