IE6 acting weird with ../ kind of relative includes for CSS and JS

  • Thread starter Thread starter Imran Sadat
  • Start date Start date
I

Imran Sadat

Hi,

I have the following directory structure. A sample of the files is
given below.

Home/
submit.do
home.html
Home/xslt
tranform1.xsl

Home/css
transform1.css
style.css

Home/js
myjs.js

Home/jsp
xslout.jsp

Now what happens is when a person chooses something on the home.html
page, a request is passed to submit.do. The result of submit.do is a
redirection to xslout.jsp which is in the Home/jsp folder. This jsp
returns an xml. This xml refers to transform1.xsl for transformation.
This xsl includes the javascript using the code in the head section of
the output html:
<script type="text/javascript" src="../js/myjs.js"></script>

On some computers the request sent by IE to the server is for a file
js/myjs.js

while on others it is correctly sent as
Home/js/myjs.js

This is really weird because on the 8 computers I tried this, 4 sent
the correct request and 4 did not.

Has anyone encountered this problem before?

I know I can get the page to work by changing the src to src="/Home/js/
myjs.js" but any ideas how to get the above code to work.

The same thing happens if I include a css in the file.

Your help is really appreciated.

Thanks

Imran
 
I have narrowed down the problem to this cause:

This happens on some of the PC only if they were redirected to the
xslout.jsp from the submit.do, i.e. if xslout.jsp is called directly
from the browser then this problem disappears in these PCs as well.

The redirection is using a 302 response code, so the next request
actually originates from the browser, so there shouldn't be any
ambiguity about the .. in the href parameters.

I even tried copying the registry settings in the HKLM...\Internet
Explorer and HKCU...\Internet Explorer to a machine that works. Still
with no success.

I hope this helps.
 
Hey everybody,

I have put in a test page on the internet which should recreate this
problem:

Can you guys visit

http://www25.brinkster.com/imransadat/bugtest.asp

If you get the message
No bug. Browser test passed.

then everything is OK with your PC.

But if you get the message
Bug found. Browser test failed.

that means that this relative problem exists on your PC.

If you get the bug on your PC and are able to solve it, please let me
know which files/programs you updated to resolve it.

Thanks,
Imran
 
Back
Top