Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Javascript problem


Reply


5 Posts   2509 Views

Avatar
d_armin

Community Member, 8 Posts

24 April 2007 at 11:03pm

Hi,
i added some javascript code (google gadget and javascript menu) in my page template. In IE it's all perfect shown, in FF not. In FF there's no error message and no javascript results. When i save the source of the page as a html document, and open it with FF, then everything is perfect. Where is the problem?

Thanks

Avatar
d_armin

Community Member, 8 Posts

26 April 2007 at 12:44am

Partially solved. ContentNegotiator::disable(); solved the problem. It's all shown in firefox now. The site is now ca 30% slower. Is it because i disabled the content negotiation or because of the javascript? The formating of the site has changed now a little. Maybe now someone knows where my problem was with the javascript, so i can solve it and enable the ContentNegotiator.

Thanks

Avatar
Sean

Forum Moderator, 922 Posts

26 April 2007 at 10:22am

Edited: 26/04/2007 10:23am

ContentNegotiator just disables the use of XHTML DOCTYPE unless the XML header is present. Disabling ContentNegotiator turns off this function completely - so it shouldn't really affect much on a standard web page.

You could try adding the XML tag, just before the DOCTYPE:

<?xml version="1.0" encoding="UTF-8"?>

...then reload the document in Firefox. Make sure you comment out your ContentNegotiator::disable(); for this.

You'll get XML parsing errors if there's any structural problems.

Hope this provides some leads,

Cheers,
Sean

Avatar
Ingo

Forum Moderator, 801 Posts

26 April 2007 at 11:23am

i don't see how changing the doctype would make the site slower on rendering/javascript-execution. Content-Type: text/xml is probably parsed slightly different in browsers, but that shouldn't have a huge impact. having "standard mode" or "quirksmode" is also just a CSS-rendering-switch, shouldn't have any speed-impact. long story short: most likely its the javascript itself slowing down the site :)

Avatar
d_armin

Community Member, 8 Posts

27 April 2007 at 6:59am

Hi,
Thanks for fast reply :)
the javascript is slowing the site down. I measured it :)
But, why javascript won't work on FF when i enable the ContentNegotiator.
In IE is everything ok.What's wrong?