Search code examples
javascriptjquerymarkupdoctype

Javascript Exception (only occurred for FireFox 4.01 on PC)


Of users thus far, only 1 has experienced a major js exception on the homepage. They are using FireFox 4.01 on a PC (not sure about the operating system).

I can't reproduce the error on my own machine (FireFox 4.01 and Windows 7).

I validated the markup and it's largely alright. The error seems related to the DOCTYPE declaration based on the screen shot, though it's confusing because the exception is not being thrown on all of the site's pages for this user and all pages have the same declaration.

The link is nabshack.com

I've attached a screen shot of the error (again, which I can't reproduce).

Thanksenter image description here


Solution

  • I don't think that it's the doctype tag of the page itself, but that it comes from an included file.

    You don't get a syntax error from HTML, so it's likely that it's a script tag that tries to include a javascript file. If the file doesn't exist, the server will return an error page instead. If you have an error page that returns status 200 instead of 404, the browser will still try to use it, and as it contains HTML instead of Javascript you get a syntax error.

    So, check that the script tags that you have in the pages are correct.