Disable web browser tab previews in Windows 7
Jun 24, 2010 Technology, Work
Recently I upgraded my work machine from Windows Vista to Windows 7. While learning the new features of 7 I found that Aero likes to show tab previews of each tab I have open in Firefox, Internet Explorer and Opera. I am the kind of guy that keeps multiple tabs open almost all day long looking up items, coding, … the list could go on so I found this “feature” a pain. As you can see in the below image that I have multiple websites open but you cannot tell if it is multiple windows or multiple tabs.
Now with the picture below you can easily see I have only one window open but four tabs.
To disable tab previews in Firefox you need to do the following:
- Open the about:config page in a new tab or window
- Filter for: browser.taskbar.previews.enable
- By default this is set to true so double click on the true to swap the value to false
- Your done!
Now for Internet Explorer you have to open the the Internet Options. You will do this by opening Internet Explorer and in the toolbar look for the Tools icon which looks like a gear and then select Internet Options at the very bottom.
Once in the Internet Options click on the Settings button in the Tabs section.
Once in the Tabbed Browsing Settings un-check the option that says: Show previews for individual tabs in the taskbar*, then click OK on all the open windows and close out of Internet Explorer.
Now for Opera we have to open the opera:config page in a new tab or window.
Scroll down to a section titled User Prefs and expand this section.
Scroll down towards the bottom of the User Prefs section and un-check the check box: “Use Windows 7 Taskbar Thumbnails”
Once you have unchecked this box scroll down to the bottom of the User Prefs section and click the save button. You will eventually be presented with the following dialog box once complete.
That is how you disable tab previews in Windows 7 for popular browsers.
Tags: Firefox, Internet Explorer, Opera, Web Browser, Windows 7
Get Browser Type
Jun 1, 2010 PHP Coding, Technology
Have you ever wanted to create a stats application that identifies the users browser type? The following function will allow you to easily do just that. This function can be expanded by adding more values to the $browser array so you can match other browsers. This getBrowser() function parses the $_SERVER['HTTP_USER_AGENT'] variable to get the current browser.
function getBrowser($userAgent) { // Create list of browsers with browser name as array key and user agent as value. $browsers = array( 'Opera' => 'Opera', 'Mozilla Firefox'=> '(Firebird)|(Firefox)', // Use regular expressions as value to identify browser 'Galeon' => 'Galeon', 'Mozilla'=>'Gecko', 'MyIE'=>'MyIE', 'Lynx' => 'Lynx', 'Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)', 'Konqueror'=>'Konqueror', 'SearchBot' => '(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp/cat)|(msnbot)|(ia_archiver)', 'Internet Explorer 8' => '(MSIE 8\.[0-9]+)', 'Internet Explorer 7' => '(MSIE 7\.[0-9]+)', 'Internet Explorer 6' => '(MSIE 6\.[0-9]+)', 'Internet Explorer 5' => '(MSIE 5\.[0-9]+)', 'Internet Explorer 4' => '(MSIE 4\.[0-9]+)', ); foreach($browsers as $browser=>$pattern) { // Loop through $browsers array // Use regular expressions to check browser type if(eregi($pattern, $userAgent)) { // Check if a value in $browsers array matches current user agent. return $browser; // Browser was matched so return $browsers key } } return 'Unknown'; // Cannot find browser so return Unknown }
How to use this code:
echo getBrowser($_SERVER['HTTP_USER_AGENT']); $browserType = getBrowser($_SERVER['HTTP_USER_AGENT']); echo '<br />I am currently running '.$browserType.' as my web browser';
This would produce the following if I were(and am) running Mozilla Firefox:
Mozilla Firefox
I am currently running Mozilla Firefox as my web browser
If you wanted to see a larger list of browser user agent strings to expand this code you can find them at: User Agent String dot com
Tags: Coding, PHP, Web Browser