Useful Shortcuts For Firefox

Here is a quick list of shortcuts that I commonly use to speed up my browsing experience.  Most of these shortcuts should work on other modern browsers such as Opera and Chrome, however I haven’t tested them all yet. Feedback is most certainly appreciated.

  1. Middle clicking (scroll wheel) a link will open it in a new tab.  It will also close a tab.  Holding ctrl while middle clicking will open it in the foreground
  2. F6 highlights the address bar.  Ctrl + l does the same but it also will select all the text (if only a portion of the url is highlighted)
  3. Ctrl+t to open a new tab with the focus on the address bar.
  4. “/” opens quick find.
  5. Ctrl+u to view the page’s source.
  6. Ctrl+[tab] to switch between tabs, also holding shift reverses the direction.
  7. Ctrl+0 to reset text to the default size.
  8. Ctrl+[shift]+t re-opens most recently closed tab.
  9. ctrl+w closes current tab

Firefox: Create a Bookmark that Validates html

An important part of writing html is making sure that what you’ve written is valid code. W3C provides an excellent resource for validating. I will show you how to utilize this service to validate any page directly from a Firefox bookmark.

First, click on the ‘Bookmarks’ menu, and then right-click on ‘New Bookmark…’

validate bookmark
validate bookmark

Add text for the name that will be easy for you to remember. In the location text box paste the following javascript snippet:

javascript:void
(document.location='http://validator.w3.org/check?uri='+document.location+';verbose=1;ss=1')

Click the ‘Add’ button and test it out!

Show Close Button In Last Tab with Firefox 3.5

In the latest version of Firefox if you only have 1 tab open, that tab will not have the close button on it.  You can still close this tab using the menu, or the ‘ctrl+w’ shortcut.

close button on last tab

If you would like to add the button back, you’ll need to edit the userChrome.css file the Firefox uses.  On my XP computer it is located here:

C:\Documents and Settings\<your_account>\Application Data\Mozilla\Firefox\Profiles\ftz0ce5v.default\chrome

On OS X you will find this file here:

~/Library/Application Support/Firefox/Profiles/ftz0ce5v.default/chrome/

Note that ‘ftz0ce5v’ is randomly generated by Firefox so you will see something slightly different.  Once in this directory you should see a file named ‘userChrome-example.css’.  Make a copy of this file in the same directory and rename it to ‘userChrome.css’ (if it doesn’t already exist).

Open the file you have just created an add the following lines:

.tabbrowser-tabs[closebuttons="alltabs"] > .tabbrowser-tab > .tab-close-button {
 display: -moz-box !important;
 }
 .tabbrowser-tabs:not([closebuttons="noclose"]):not([closebuttons="closeatend"]) >
.tabbrowser-tab[selected="true"] > .tab-close-button {
 display: -moz-box !important;
 }

Restart Firefox and you will see the last open tab now has a close button. Original code and other nifty customizations found here.

Remove New Tab Button From Firefox 3.5

I have just upgraded to the latest version of Firefox.  While there are many new features in 3.5, the one that you will probably notice first is the addition of a button to the right of your tabs that will open a new blank tab.

Remove New Tab Button From Firefox 3.5

Since I use shortcut keys to open a new tab this button is pretty much useless to me.  I like to keep my browser as uncluttered as possible.  Fortunately, if you aren’t afraid of some minor text editing you can remove this button in about one minute.

You’ll need to find your user profile for Firefox which contains the userChrome.css file.  On my XP computer it is located here:

C:\Documents and Settings\<your_account>\Application Data\Mozilla\Firefox\Profiles\ftz0ce5v.default\chrome

On OS X you will find this file here:
~/Library/Application Support/Firefox/Profiles/ftz0ce5v.default/chrome/

On Windows 7:
%appdata%/Mozilla/Firefox/Profiles/ftz0ce5v.default/chrome

Note that ‘ftz0ce5v’ is randomly generated by Firefox so you will see something slightly different.  Once in this directory you should see a file named ‘userChrome-example.css’.  Make a copy of this file in the same directory and rename it to ‘userChrome.css’.

Open the file you have just created an add the following line:

.tabs-newtab-button {display: none}

Restart Firefox and you will see the button is gone.