Friday, May 19, 2006

Smart Browser Client Applications

I have almost migrated to using only Linux. Some of the biggest challenges I face with the migration are

  1. Web Browsing
  2. Multimedia
Firefox and mozilla did solve the first problems for me ages ago. I was recently frustated with my internet banking. My problem was

It worked well with all browsers on Windows (including firefox) and it just would not work with firefox on Linux.

Message from internet banking

After debugging the problem for a couple of hours (thanks to the built-in javascript debugger that comes along with the mozilla suite). I finally figured out the exact cause of the problem. The problem was that the banking js code was trying to be smart in trying to support browsers.

If you have the same problem, then add the following code to your $HOME/.mozilla/firefox/.../prefs.js

user_pref("general.appname.override", "Microsoft Internet Explorer");
user_pref("general.appversion.override", "4.0 (compatible; MSIE 6.0+;
Windows NT 5.1)");
user_pref("general.platform.override", "Win32");
What these preferences do is that they change the navigator.appName, navigator.platform and navigator.appVersion returned by the javascript code running in the browser.

Login screen visible after making the changes suggested above

If you think of this as hacking, please read Forget Your Password: Be Google
for a very tempting hack.

Disclaimer: I do not advocate hacking for illegal purposes, hacking is supposed to be harmless, fun and learning experience.

No comments:

Dynamic programming for the binomial coefficient

More fun things, this time with some visualisation of what happens when memoisation is used and what happens when we don't. I don'...