Forum Moderators: phranque

Message Too Old, No Replies

Problems with graphics and script after https?

         

hawkmaster

12:35 pm on Jun 1, 2004 (gmt 0)

10+ Year Member



Hello,
my Apache 2 runs with WinXep. It is configured with https and http.
When I run my website with https all is fine.
When I close the site and open the browser again and run the site with http; some graphics are not shown although the paths are correct. Also I have some problems with my external Javascript file.
What can I do?
Is the browser the problem?

regards
hawk

jdMorgan

4:26 pm on Jun 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hawk,

Welcome to WebmasterWorld [webmasterworld.com]!

This could be the famous IE bug with small images and scripts. What browsers have you tested with?

Jim

hawkmaster

6:32 pm on Jun 1, 2004 (gmt 0)

10+ Year Member



Hi
thank you for your help
I have tested it with IE6 and Mozilla 1.7 RC2
Both the same.
regards
hawk

jdMorgan

2:43 am on Jun 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you get the same behaviour with Mozilla, then it's not the IE bug.

What do you see in your server access and error logs when the images and script fail to load?

Jim

hawkmaster

8:16 am on Jun 4, 2004 (gmt 0)

10+ Year Member



Hi
now I have looked into my "acces.log"
---------
127.0.0.1 - - [04/Jun/2004:10:04:30 +0200] "GET /infostreamweb/jobtk/index.php HTTP/1.1" 200 1442
127.0.0.1 - - [04/Jun/2004:10:04:54 +0200] "GET /infostreamweb/jobtk/index.php HTTP/1.1" 200 1442
127.0.0.1 - - [04/Jun/2004:10:04:54 +0200] "GET /infostreamweb/check.js HTTP/1.1" 304 -
127.0.0.1 - - [04/Jun/2004:10:04:54 +0200] "GET /infostreamweb/win.css HTTP/1.1" 304 -
127.0.0.1 - - [04/Jun/2004:10:04:54 +0200] "GET /infostreamweb/image/InfoStreamLogo.jpg HTTP/1.1" 304 -
127.0.0.1 - - [04/Jun/2004:10:05:10 +0200] "POST /infostreamweb/jobtk/index.php HTTP/1.1" 200 2373
127.0.0.1 - - [04/Jun/2004:10:05:10 +0200] "GET /infostreamweb/jobtk/jobtk.php?USER=guest&UIN=a746432b600c0fc34770ffffdcb69c41&login_first=yes&offen=true HTTP/1.1" 200 16684
127.0.0.1 - - [04/Jun/2004:10:05:22 +0200] "GET /infostreamweb/jobtk/jobtk.php?USER=guest&UIN=a746432b600c0fc34770ffffdcb69c41&login_first=yes&offen=true HTTP/1.1" 200 16684
127.0.0.1 - - [04/Jun/2004:10:05:22 +0200] "GET /infostreamweb/check.js HTTP/1.1" 304 -
127.0.0.1 - - [04/Jun/2004:10:05:22 +0200] "GET /infostreamweb/win.css HTTP/1.1" 304 -
127.0.0.1 - - [04/Jun/2004:10:05:23 +0200] "GET /infostreamweb/include/menu_com.js HTTP/1.1" 304 -
----------
The image
InfoStreamLogo.jpg is the image which does not show correct in http. The file check.js is the external javascript file.
My Mozilla Javascript Console shows
----
Error: syntax error
Source File: [localhost...]
Line: 2
Source Code:
}
----------
it shows me the check.js file as
-------------
ument.forms[0].SINGLEUSER.checked=false;
}
if(document.forms[0].MULTIUSER.checked==true)
{
//document.forms[0].SINGLEUSER.checked=false;
document.forms[0].accountname.value="*";
document.forms[0].accountname.disabled=true;
}
else
{
document.forms[0].accountname.disabled=false;
}
}
-------------
there are missing some lines in the javascript function
but why?

Curious thing:
when i run the website with https again
all is correct

any idea?
regards
hawk

hawkmaster

4:26 pm on Jun 4, 2004 (gmt 0)

10+ Year Member



Hi again
is it possible that firewall ZoneAlarm makes such a curious happenes?
regards
hawk

jdMorgan

4:29 pm on Jun 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The 304 responses indicate that the files are already in your browser cache, and are not being fetched from your server; The browser is checking with the server, and the server is saying "304-Not Modified", so the content is returned from your local cache instead. So, this leads to a question -- Have you tried flushing all of your browser caches?

Also, that "ument.forms" on line two looks pretty bad. It looks like the first three characters are missing. Is that what you see in the JS console, or is it a cut and paste error from posting here?

Jim

gergoe

10:50 pm on Jun 4, 2004 (gmt 0)

10+ Year Member



Most of the browsers and internet proxies does not cache responses over the ssl connections, which means that if your machine has got its cache corrupted, then you can have such a behavior when using unencrypted communication, but because the secured connections aren't cached, the files are requested from the server every time. Check the response of the server for those requests with telnet.

The firewall program might can cause such a behavior, I'd suggest you to disable it completely (uninstall?) while you are testing your Apache. The chance that this is caused by the firewall is very small, but still a great opportunity to make your life easier (and solve the problem faster)