How can I customize firefox error page
-
- Posts: 2
- Joined: November 23rd, 2006, 8:39 pm
How can I customize firefox error page
I want to customize the "server not found" page. I remember seeing something about it, but I can't find how to do it anywhere.
Any help is appreciated.
Any help is appreciated.
- smsmith
- Moderator
- Posts: 19979
- Joined: December 7th, 2004, 8:51 pm
- Location: Indiana
Hmm. This can be done, but you're going to need to get pretty dirty to get it done. Ready?
First, learn about userContent.css:
http://kb.mozillazine.org/UserContent.css
http://kb.mozillazine.org/Profile_folder
Now, the easiest way to learn about the elements on the error page is to go to the source. So, go to the chrome folder in the Firefox program folder, usually C:\Program Files\Mozilla Firefox\chrome in Windows Explorer. Find the file called classic.jar and copy that somewhere else. Rename classic.jar to a .zip file and extract it, preferably to a folder called classic at whatever location you are at. Then, open the classic folder and navigate to ...\classic\skin\classic\global and find the file called netError.css.
Open the netError.css file in Wordpad (Notepad doesn't seem to work for me because then the lines all run together). See all the code that starts with the # symbol? Those are the things you can easily change. Copy all the #ELEMENT code into your userContent.css file.
Now you can start making changes to see what you like. I would make small changes at a time to see if it works the way you want. After each change, you need to close and restart Fx. Here's one to get you going:
That should make the box that surrounds the error message be red with square corners instead of white with a rounded corner border. Remember that before every semi-colon, you need to put !important or the change won't do anything.
Good luck.
-Sean
First, learn about userContent.css:
http://kb.mozillazine.org/UserContent.css
http://kb.mozillazine.org/Profile_folder
Now, the easiest way to learn about the elements on the error page is to go to the source. So, go to the chrome folder in the Firefox program folder, usually C:\Program Files\Mozilla Firefox\chrome in Windows Explorer. Find the file called classic.jar and copy that somewhere else. Rename classic.jar to a .zip file and extract it, preferably to a folder called classic at whatever location you are at. Then, open the classic folder and navigate to ...\classic\skin\classic\global and find the file called netError.css.
Open the netError.css file in Wordpad (Notepad doesn't seem to work for me because then the lines all run together). See all the code that starts with the # symbol? Those are the things you can easily change. Copy all the #ELEMENT code into your userContent.css file.
Now you can start making changes to see what you like. I would make small changes at a time to see if it works the way you want. After each change, you need to close and restart Fx. Here's one to get you going:
Code: Select all
#errorPageContainer {
-moz-border-radius: 0px !important;
background-color: red !important;
}
That should make the box that surrounds the error message be red with square corners instead of white with a rounded corner border. Remember that before every semi-colon, you need to put !important or the change won't do anything.
Good luck.
-Sean
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
- Thumper
- Posts: 8037
- Joined: November 4th, 2002, 5:42 pm
- Location: Linlithgow, Scotland
- Contact:
- Frank Lion
- Posts: 21177
- Joined: April 23rd, 2004, 6:59 pm
- Location: ... The Exorcist....United Kingdom
- Contact:
Thumper wrote:This is all much easier if you use the Stylish extension in conjunction with the DOM inspector. No messing around in jar files or profile directories.
Errr, once you have learnt how to use both - yeah, people are going to really learn the DOMi just for this.
Please stop glowering with resentment in the background when other people are making an effort to learn things.
- Frank
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
.
-
- Posts: 2225
- Joined: November 9th, 2004, 6:45 pm
- Location: Jakarta, Indonesia (UTC+7)
- Contact:
- smsmith
- Moderator
- Posts: 19979
- Joined: December 7th, 2004, 8:51 pm
- Location: Indiana
Thumper wrote:This is all much easier if you use the Stylish extension in conjunction with the DOM inspector. No messing around in jar files or profile directories.
Yes, I realize there are easier ways to do this. But, I took the chance that he/she doesn't know anything about the structure or the coding required for the page. Trying to teach someone about domI in a forum thread doesn't sound like an easy task. I should know, Frank's already schooled me on quite a bit. Thanks Frank!
The reason I gave the location of the jar and the file in it, is that's the easiest way I could think of for them to see how the page is put together.
-Sean
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
-
- Posts: 2
- Joined: November 23rd, 2006, 8:39 pm
-
- Posts: 2
- Joined: September 7th, 2008, 6:35 pm
Re: How can I customize firefox error page
So what file are the error messages themselves in? Having the same problem here.
-
- Posts: 2
- Joined: September 7th, 2008, 6:35 pm
Re: How can I customize firefox error page
Found them.
C:\Program Files\Mozilla Firefox\chrome\en-US.jar\locale\en-US\global\netError.dtd
Change the jar to a zip to modify, obviously.
C:\Program Files\Mozilla Firefox\chrome\en-US.jar\locale\en-US\global\netError.dtd
Change the jar to a zip to modify, obviously.
-
- Posts: 21
- Joined: November 3rd, 2009, 6:08 pm
Re: How can I customize firefox error page
Great information... been trying to figure this out for a few days. Question I have is this. I created a host file for our work server which blocks specific sites, if I try to access those sites from any computer I just receive the page can not be displayed message. What I would like to do is create a page that recognizes 127.0.0.1 and display it's own page; is this possible?
Better yet, is there any way to create an internal computer error page (cross browser) without having to install a webserver? Is it possible with ODBC or something?
Better yet, is there any way to create an internal computer error page (cross browser) without having to install a webserver? Is it possible with ODBC or something?
- ttocsmij
- Posts: 33
- Joined: February 4th, 2006, 10:16 pm
Re: How can I customize firefox error page
Apologies as this is basically off-topic, per se. If I understand the netError.xhtml code properly, one only needs to properly "call it" to obtain the appropriate error page. What I'd like to know is how to format that call. I ran across this "call" in an article last week:
moz-neterror:page?e=404&u='http://www.sample.com/'&d='this is the description to be used'
but entered from the browser it only displays a blank page so I know I am missing a detail or two.
Does anyone know a link or article where I can get the rest of the details? Thanks in advance for your patience and assistance.
moz-neterror:page?e=404&u='http://www.sample.com/'&d='this is the description to be used'
but entered from the browser it only displays a blank page so I know I am missing a detail or two.
Does anyone know a link or article where I can get the rest of the details? Thanks in advance for your patience and assistance.
"Of all the things I've lost, I miss my mind the most!" - Mark Twain
- LoudNoise
- New Member
- Posts: 39900
- Joined: October 18th, 2007, 1:45 pm
- Location: Next door to the west
Re: How can I customize firefox error page
Somewhat OT and you are replying to an elderly thread (started 2006). Locking. Please start a new thread.
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."