Tuesday, June 7, 2011

Firefox Hack

Here is a simple Firefox hack to introduce backward and forward compatibility into your Firefox Browser.

Problem Statements :

1 : Recently, I tried to install Google Gears ( Used to run applications offline ) on my Firefox Browser 4.0 Beta 12 . The issue I faced was that Google Gears was not supported in Firefox 4.0 ( In the sense it was incompatible ). So, I need to somehow introduce the backward compatibility mode in Firefox 4.0 , So that I can run and Install Google gears.
So , I found out a way to introduce backward compatibility mode in Firefox 4.0 to make it compatible with its earlier versions such as 3.6.8.

2 : Other issue that might occur while using the older versions of the Firefox such as 3.6.8 is that they don't support applications such as Angry Birds game developed completely using HTML 5 , CSS 3 and GWT at chrome.angrybirds.com . To introduce forward compatibility the same hack works ( For some cases not for all ).   

Here are the Hacks :

#1 . So, to introduce the compatibility mode in Firefox ( Any version ) .
Type in "about:config"  without the quotations in the address bar of the   browser . Then , accept the warning to enter the about:config entries which are used to tweak the Firefox Browser . For further details click here . Then type in the search bar (Filter ) general.useragent.compatMode.firefox which is basically a boolean value . If the value is set to false double click on the entry to turn it to true.
This introduces compatibility mode , If it doesn't work try the next hack .

#2 . This Hack is more effective . In this Hack Follow the Following steps :
  • Right click anywhere in about:config page and select the the New and then the String .
  • It asks for the Preference name , give it as general.useragent.override .
  • Then in the string value enter Mozilla/5.0 (Linux; U; OpenSUSE 11.4; en-US; rv:1.8.1) Gecko/20061010 Firefox/3.6.8  to introduce backward compatibility for Firefox 4.0 and to introduce forward compatibility in the browser change Firefox/3.6.8 to Firefox/4.0 .

Concept Behind the Hacks :

Applications on the web check for compatibility of your browser by checking the user agent which is set by your Browser. So, In the above hacks by introducing the general.useragent.override string value into the Browser we are overriding the default  useragent set by the browser,thus making the applications believe that they are using the required comaptible browser .

Any problems , Do feel free to comment .


No comments: