« March 2007 | Main

April 2008 Archives

April 26, 2008

Firefox & IE Tab: Rendering the Intranet in IE

I really like Firefox but still find many web sites that just work better in Internet Explorer.  IE Tab is a great extension that allows you to use the Internet Explorer rendering engine within a Firefox tab.  One of it's most useful features is the ability to create rules that define when IE Tab should be used automagically.  These rules evaluate the requested web address and can be simple string matches or can be more complex regular expression pattern matches.

Here is a screen shot of the interface for configuring the web addresses that will be rendered using Internet Explorer.

IE Tab Sites Filter

The * in some of the addresses specifies a wild card and is a very simple way to define a pattern.  More powerful patterns can be defined using regular expressions.  An example of a regular expression pattern in the above screen shot is, "/^https?:\/\/[A-Z,a-z,0-9,\/]*$/", this pattern will match all intranet web addresses and render them using IE.  If you work for a company that uses Active Directory and has a sizable intranet IE is often an easier browser to use because it will not force you to login for every different intranet web server that resources are requested from (it will automagically pass your Windows credentials).

Explanation of intranet regular expression site filter:

  • The // surrounding the pattern let IE Tab know that the rule is a regular expression.
  • "^" calls out the beginning of the web address
  • "http" must be the beginning of the web address
  • "s?" means that "s" is an optional character in the web address following the "http". ? is states that the character immediately preceding is optional and may or may not exist
  • ":\/\/" means that "://" must come after the http(s) portion of the pattern.  The backslashes are used because the forward slashes have to be escaped as they are special characters in the Regular Expression syntax
  • "[A-Z,a-z,0-9,\/]" means that any character that falls in the ranges defined within the brackets is a valid pattern match.  In this case we are restricting valid characters to alphanumeric values and forward slash
  • "*" states that the previous pattern can be matched for many characters.  Without the star following the "[A-Z,a-z,0-9,\/]" the pattern would only match a single character following the "://"
  • Finally the $ calls out the expected end of the web address

**UPDATE**
Came up with a better version that works for more cases.  This one will work for any address that doesn't include a top level domain before the first slash or question mark.

/^https?:\/\/[^\.\/\?\n]*((\?|\/).*)?$/

About

View Eric Schoonover's profile on LinkedIn
 

Follow me on Twitter
 
© Copyright 2007, Eric Schoonover

Search

About April 2008

This page contains all entries posted to Capital Design in April 2008. They are listed from oldest to newest.

March 2007 is the previous archive.

Many more can be found on the main index page or by looking through the archives.

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.