Internet Exploder

You know I am starting to get more than a little ticked off with Internet Explorer 7 on Tablet PCs. It seems to be incapable of coping with the closure of a tab when that tab (or maybe the next ‘live’ tab) is showing anything modern like a web 2.0 site or some such social networking site. What happens is simply that the program stops working and sometimes allows itself to be closed with the X but more often than not requires the task manager to close it.

Quote of the Day

When Internet Explorer died again as I had the audacity to close a tab, I was amused at the suggestion it came up with to help:

Problem caused by Windows

This problem was caused by Windows, which was created by Microsoft Corporation. Currently, there is no solution for the problem that you reported.

{roffle}

The Trouble with PNG Images

I’ve recently been doing a web site refresh for someone who wanted their site to be more up to date looking, less ‘blocky’ and still CSS-based and standards-compliant. They’d had another designer approach them – or more particularly, the boyfriend of a staff member had approached them – and knocked up a good-looking, if table-based, version of their home page.

OK, he’d forgotten to check the site in different browsers and on different platforms, so it was very broken and likewise it was nowhere near being standards-compliant, but hey-ho…

So they asked me to produce a working, standards-compliant version which I duly did. One of the elements they wanted was a navigation bar to match their current logo colours and I created the background for the navigation area and saved it as a PNG: I didn’t want a GIF image due to the blockier look of the curved ends that would result from using that format and I didn’t want a JPG image due to the file size (I try to ensure my pages come banging in as quickly and efficiently as possible).

The result looked great in all the browsers I tested it on.

The client then asked me to change the navigation element so that there was some mouseover effect, so I went for their logo colour on the text over white when the mouse is over the link and white text over their logo colour in the ‘off’ state. At this point, it looked great in Firefox, Opera, Safari, etc. but the colours were off in Internet Explorer 7 (which has only recently included support for PNG images).

I thought it was just my CSS being screwed up and checked the PNG file I was using for the DIV background against the hex code I was using for the navigation element colour and found they were exactly right. I then did a screenshot and lifted the hex code from the background to find that it was different to the original image when displayed in Internet Explorer 7. The reason? Gamma correction within PNG images which gets stripped out by web browsers except for Internet Explorer! I’d never come across this before as I was used to using GIFs and JPEGs due to the earlier lack of PNG support in Internet Explorer.

There’s a good blog entry about it here that links to this article and this paper.

The Trouble with Firefox

I tend to have a number of web browsers installed on my systems to make sure I can test web pages in a number of up to date browsers, and this includes Firefox (
)

But one issue I have with Firefox is how after a few hours’ use – especially as my use these days tends to include a number of AJAX-based sites, Gmail, etc. – the amount of memory being consumed sky-rockets despite, or possibly because of, the amount of physical memory on my main work machine.

This evening, I’ve implemented a number of hacks that may or may not help things out with this supposed memory leak (apparently it’s working as designed…), so here we are. This is Firefox version 2.0.0.6, by the way.

Firstly, we want to reduce the amount of RAM being used for Firefox’s cache. We do this like this:

1. Type “about:config” (no quotes) in the browser
2. Find browser.sessionhistory.max_total_viewer
3. Set its value to “0″
4. Restart Firefox

Secondly, as minimising the browser window seems to accomplish little, we’ll try to reduce memory use when it is:

1. Type about:config again and then press Enter.
2. Right-click in the page and select New -> Boolean.
3. In the box that pops up enter config.trim_on_minimize. Press Enter.
4. Now select True and then press Enter.
5. Restart Firefox.

Still with me? Now we’ll move on to page rendering speeds and more memory leak hacks, this time from “Have Laptop Will Travel”:

“Type in the address bar about:config.
Type pipelining in the filter bar.
Double-click on network.http.pipelining to set its value to TRUE.
Double-click on network.http.pipelining.maxrequests and change its value to 12 or more if you have broadband.

Play a little with the setting to find a configuration which is best for your connection.

Firefox is most hated for its memory usage. After having browsed some hours, Firefox will easily have taken 250MB or more of memory and slow down your PC. This is because FF has never been programmed to overwrite the memory it doesn’t use anymore and give free to other programs. Sometimes even closing Firefox won’t speed up your PC anymore. But the leakage can be prevented.

To do so, open a new tab and type about:config in your address bar again.
This time we want to limit the size of the memory cache.
Therefore we need to create a new preference, named browser.cache.memory.capacity.
Right click on any free area in the preferences window and choose New —> String.
Type now the name browser.cache.memory.capacity and in the next window set the value to 20000.
This will limit the size of the cache in the RAM to 20000KB and should prevent the annoying memory leak.
Restart your browser now.”

And after I’d found and implemented these hacks, I discovered them and more at the element14 Blog.