leederbyshire.com  Mobile web applications for Microsoft Exchange Server.
HOME OWA FOR PDA BUY ONLINE DOWNLOADS TESTIMONIALS SCREENSHOTS FAQ MANUAL (WIP) UPGRADE ARTICLES CONTACT

OWA Close Browser Window Exchange 2007

Microsoft Outlook Web Access 2007 - Close The Browser Window Immediately When Logging Off

Back to Articles page

In OWA 2007, when you click the Log Off button, you will normally see another page with a Close Window button. Then you see a warning telling you that 'The web page you are viewing is trying to close the window - Do you want to close this window?'. Of course, most people want to bypass all this, and just close the browser window as soon as they click the Log Off button. Fortunately, there is a way to make that happen.

First, look for the logoff.aspx file in the C:\Program Files\Microsoft\Exchange Server\ClientAccess\Owa\auth folder. Make a copy of it (important if something goes wrong), and then open it in Notepad. A few lines into the page, you will see the opening <head> tag. Immediately after it, insert some code so that it looks like this:

  <head>
  <script language="JavaScript">
  window.opener='Self';
  window.open('','_parent','');
  window.close();
  </script>
Save the file back, and you should find that the IE window now closes as soon as you click on Log Off.

Note:
The above code has been tested with IE8, and replaces the code below that was sufficient for IE6 and earlier:

  <head>
  <script language="JavaScript">
  window.opener='x';
  window.close();
  </script>
IE8 is a bit cleverer, but can still be tricked into closing the window.

As with most of these type of modifications, you will need to check that they still function after each product update. Sometimes your modified file will be replaced by a new one from the update.

OWA With HTC
Copyright © 2017 Lee Derbyshire. All rights reserved.