Useful JavaScripts when dealing with browser compatibility

Just finished some jquery/javascript stuff when the customer called and told me „It’s not working“, after some talks we’ve found out, they use IE8. And the page was optimized for „current“ browsers, while I wouldn’t say the ie8 is current, it seems that IE8 is shipped with some (all?) windows 7 installations. Hence everything had to be modified to work with IE8. Then the customer called again and asked „Uhm, can we make sure it works for IE7, too?“ – That was the moment I was looking for some ways to test pages in IE7 and by doing so I stumbled over a few interesting JavaScripts:

Continue Reading


Somehow I thought the singleton pattern would be pretty useful for my Request and Response classes, because they’re unique things and there should be only one object of them. They shouldn’t get initialized over and over again. PHP is request based, which means, once you got the output of your php script, the request is finished. Reloading the page will just cause a new request. That means if you write a Request or a Response class it doesn’t make much sense to initialize them more than once. At least, that’s my opinion.
Continue Reading

Quality of Regexp

In my last blog-entry you’ve seen that I compared regexp vs nonregexp-techniques and the result was, that there are „bad“ and „good“ regexp; while the good regexp are as fast as non-regexp-techniques. Let’s take a closer look at what „good“ regexp are. Please notice that I’m not a regexp-magician so if you know about a regexp which would do better than the regexp I’ll show, please let me know.

Want to jump directly to the result and skip the boring php examples? 🙂
Continue Reading