Last week I had a strange behavior with an custom 404 error page I have made for my clients SharePoint application: The page was not working with Firefox.
Instead of showing the rendered page Firefox showed the HTML source of the file. The HTML file was encoded in UTF-8. You can see it in the following picture:
This behavior doesn’t occur always:
- The error page renders correctly if you type
- The error page renders in a wrong way if you type
Reason why the custom 404 error page doesn’t work with Firefox
The OOB Html page is encoded in UTF-8 and has some invisible symbols at the beginning of the file. Since you can’t see it with Visual Studio or Notepad you won’t recognize.
This is the reason why the Html isn’t rendered using Firefox. To see the symbols open command prompt, change to the directory with your file and type
Now you can see the symbols:
Solution to get the custom 404 error to work with Firefox
You can edit the error HTML page using Notepad++ which can be downloaded at: Notepad++. If you open the page you can set a property to save the file without the BOM:
After an iisreset you will see that the custom 404 error page is now rendered using Firefox. Please remember that this occurs only when you type the URL the following way: http://moss2007/dfgdfgdfgdfg.
Credits go here:
Hope this helps to get this page working.