FCKeditor in Firefox – Illegal Character JavaScript error

For some reason, FCKeditor would not load in Firefox 2.0 even though it loaded in IE just fine. Turns out Apache was serving up the javascript files as the wrong FileType, so Firefox would choke on some jibberish characters:
Error: illegal character
Source File: http://www.myserver.com/FCKeditor/editor/js/fckeditorcode_gecko.js
Line: 1, Column: 1
Source Code: /*

The fix is easy enough, simply add an .htaccess file to your dir containing the following:
AddType application/x-javascript .js
Now FCKeditor should work fine in Firefox.

5 responses to “FCKeditor in Firefox – Illegal Character JavaScript error”

  1. Jon says:

    Wow…I can’t believe I stumbled across this page…it solved the exact problem I was having. Thanks.


  2. Dave says:

    For Tomcat users this does the trick in web.xml –


  3. Dave says:

    That’s a mime-mapping, extension and mime-type.. No HTML allowed it seems.

  4. Rob says:

    This worked perfect for me after days of searching and trying other solutions. Thanks you.

  5. Boddi says:

    Hi Rod:
    how did you do it?I’ve encounter the some error,it’s very appreciation if you can send the solution to me, my email is boddi8888@gmail.com.
    Thank you very much.