Stylesheet not Loading and Javascript Errors Before Refresh

G

Guest

I am having an issue (maybe two issues) in my application regarding a
stylesheet not loading and I am getting Javascript Errors. If I clean out a
client's temporary internet files and then browse to the site, the page is
displayed without a stylesheet. If I continue to use the app, general
Javascript Errors like "Object Expected" start occurring. If I click
refresh, the page and the stylesheet displays fine and there are no
Javascript errors.

The issue does not occur if a client first browses to my development
workstation (XP Pro). It only occurs when I move the code to our production
server (Win 2003, Compression Turned On, Anonymous Access) and it only seems
to happen on WinNT client machines (both IE6 and 5.5). I am using asp.net
1.1 and my stylesheets are included like <LINK href="css/UI.css"
type="text/css" rel="Stylesheet">. I have tried adding Media=Screen and I
have verified that the mime type is text/css even though these solutions
would only fix the CSS problem, not the JS problem. I do use include
javascript files and they are included like <SCRIPT language="javascript"
src="include/common.js"></SCRIPT>. I also use .Net Validators and the pages
w/ the validators seem to have the issue. I have double checked and the
aspnet_client folder exists and is in the proper place.

Have you seen this before or have any ideas for a solution? It seems as
though the page is being loaded, but none of the included files are. But
when refreshed (or cntrl+f5) is clicked, all the files load and the page
works perfectly fine.
 
S

Steven Cheng[MSFT]

Hi,

Thanks for your posting. Regarding on the problem you mentioned, it seems
caused by the client side browser didn't correctly load the linked resource
files in the page at the first request. I've found that there is a kb
article mentioned the similiar problem on IE, you can have a look to see
whether this helps:

#Internet Explorer Incorrectly Displays Web Pages
http://support.microsoft.com/?id=825057

You can found that the kb mentioned that such problem is likely caused by

*The Advanced setting Do not save encrypted pages to disk is selected.
*The Web page uses the HTTPS protocol.
*You have turned on HTTP compression for .css and .js files on the Web
server.

Hope helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
G

Guest

Thank you for the link to the kb article. Compressing the .css and .js files
was the issue. We excluded these files in the Metabase and it fixed the
issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,133
Latest member
MDACVReview
Top