DNS Cache 1.5 released

Permanent Link: DNS Cache 1.5 released 13. Juli 2009 Comment No Comment

Today the latest version 1.5 of my Firefox plugin "DNS Cache" finally went public. Apart from Firefox 3.5 compatibility the following things have changed:

  • Explicitly flush DNS cache when deactivating
  • Toolbar Icon now has a context menu (right click): "Enable / Disable DNS Cache" and new:
  • "Flush DNS Cache": Flushes the DNS Cache no matter if the cache is disabled or not
  • Toolbar Icon now has to be double clicked in order to change the dns cache state

You can get the Firefox addon at the Firefox Add-ons page. If you've already installed it from there you should get the update automatically.

If you should experience any problems, please let me know!

DNS Cache 1.4 released

Permanent Link: DNS Cache 1.4 released 18. Februar 2009 Comment No Comment

Unfortunately there is an annoying bug in DNS Cache 1.3: It doesn't work if you don't enable the main panel icon. The bug is fixed now, you can install DNS Cache 1.4 directly from here. The Firefox Addons Page should be updated within the next few days.

If you've experienced problems with Version 1.3 (clicking on the icon in the statusbar had no effect), please follow these 4 easy steps after/before installing Version 1.4:

  1. Open about:config
  2. Filter for "network.dns"
  3. Right-Click on "network.dnsCacheEntries" and select "Reset"
  4. Right-Click on "network.dnsCacheExpiration" and select "Reset"

DNS Cache 1.3 released

Permanent Link: DNS Cache 1.3 released 9. Februar 2009 Comment No Comment

I just released the latest version of my DNS Cache extension for Firefox. The changelog is rather short:

  • New: Statusbar Icon
  • Improved Image Quality of the main panel icons

You can install it directly from here. I already submitted the new version to the Mozilla addons page, but it's still in the sandbox. You can install it from there too anyhow, if you follow this link and then click on "Show all versions" and then select Version 1.3 for installation.

Useful Firefox addons for web developers

Permanent Link: Useful Firefox addons for web developers 9. Februar 2009 Comment Comments (13)

Here's a short list of useful Firefox addons for web developers:


Probably the most useful addon around. You cannot only change the whole page on the fly (HTML and CSS) but you also have the very useful Javascript console which can even be used by your application for debugging. Furthermore you can see all AJAX activities. Download at https://addons.mozilla.org/de/firefox/addon/1843


FirePHP allows you to send debug messages to Firebug through a PHP Script. Download at https://addons.mozilla.org/de/firefox/addon/6149


Greasemonkey allows you to create JavaScript scripts for specific or all websites (Use of wildcard * possible!). This can be very useful to either test how new scripts would integrate into your website or to change the look and behaviour of any other webseite. Download at https://addons.mozilla.org/de/firefox/addon/748


Same as Greasemonkey only for CSS. This way you can easily test new styles on a website before integrating them. Download at https://addons.mozilla.org/de/firefox/addon/2108

Web Developer

The classic one. Allows you to easily change behaviour of your browser (caching, JavaScript, etc.) and has a whole lot of other useful tools like showing document size, the styles, submitting the page to the W3C Validator, Browserframe resize (to test your application for specific resolutions), viewing response headers, outlining specific elements and so on. Download at https://addons.mozilla.org/de/firefox/addon/60

Search Status

Although it also shows the page rank (not very reliable), I only use this addon to display all the nofollow links on a page, which is really extremely useful. Download at https://addons.mozilla.org/de/firefox/addon/321

DNS Cache

My own Firefox extension that allows you to disable the DNS caching of Firefox, which comes in quite handy when you have to check your webservers quickly. For a more detailed description see here. Download at https://addons.mozilla.org/de/firefox/addon/5914

JavaScript loops profiled

Permanent Link: JavaScript loops profiled 20. Januar 2009 Comment No Comment

Today I was curious and wanted to know which way of looping in JavaScript fastest. So far, I always use for var i in array, since someone once told me, it is the fastest way. For testing I created an Array with 10000 elements:

ids = [];
for (var i = 1; i <= 10000; i++) {

I used the JavaScript Profiler of Firebug for profiling. The testsystem was: Intel Dual Core T2500 @ 2.00 GHz, 2 GB RAM, Ubuntu 8.04, Firefox 3.0.5 (only installed addon is Firebug). I profiled each loop variation 5 times and took the average time for comparison. The loop variations did nothing but loop and were the following:

Loop 1:

for(var i = 0; i < ids.length; i++) {}

Loop 2:

for (var i in ids) {}

Loop 3:

function process(element, index, array) {}

When I started the test, I didn't think there would be such huge differences in the performance of those three:

JavaScript loops profiled

Here are the profiling results in detail, in case you're interested (all times in ms):

Loop 1:

Loop 2:

Loop 3 (number in brackets is the profiled runtime of the function process() - see declaration above)
33,055 (16,439)
33,262 (16,489)
33,792 (17,044)
34,682 (17,312)
35,875 (17,637)

DNS caching in Firefox

Permanent Link: DNS caching in Firefox 18. November 2008 Comment No Comment

Sometimes you need to change servers quickly, for example if you're trying to find out which of your 18 webservers is having a problem. When modifying the hosts file, you would expect the browser to point to the new direction (at latest after restarting nscd).

When using Firefox you will have the problem that it will still not work. The reason is simple: Firefox caches DNS entries for 60 seconds by default. In case of 18 webservers that would mean that you have to restart Firefox 18 times or you will have to wait 18 minutes altogether.

For that reason I wrote a simple Firefox Plugin called DNS Cache, that allows you to deactivate the internal DNS caching of Firefox. You can download the plugin at https://addons.mozilla.org/de/firefox/addon/5914.