Browser compatibility can be hard to manage sometimes. It seems that the website of capitalone, a credit card company in the US has some difficulties to make a website that runs on Iceweasel, the fork of Firefox from Debian. This post if not a discussion if Debian users should switch to Firefox but rather to explain how to use capitalone website with Iceweasel.

When you go on the capitalone website with Firefox or Internet Explorer, the homepage looks like the following with the login widget.

Capital One website with Firefox
Capital One website with Firefox

However, when trying to access using Iceweasel, the login widget does not appear and you cannot sign in. At first, this was really inconvenient because I was not able to use the website. I did not understand at first and this is just after browsing the website that I understood the root cause.

Capital One website with Iceweasel
Capital One website with Iceweasel

In fact, when going to some other page, it looks that the website is not sending data when the request is sent by special user agents. And it sounds like Iceweasel might be one of them. See below how the credit card login page looks like with Iceweasel.

The "Connection Reset" issue
The "Connection Reset" issue

Of course, you can choose to download and install Firefox on Debian but it might be more convenient to use the same browser and find a workaround. In fact, this can be solved by changing the user agent sent to the webserver. For the non technical people reading that blog, the user agent is a set of characters that identify your software. In the context of a web browser, the set of characters will indicate if the browser is Internet Explorer, Firefox, Google Chrome or Iceweasel. And depending on the user agent, the server can change and adapt the content. In the present case, it looks that the website is not sending anything when the user agent is Iceweasel.

The workaround is then to "trick" the server and send a fake user agent. To do so, install the User Agent Switcher in Iceweasel. Then, when going on the capitalone website, change the user agent to something popular (such as Firefox as shown below) and the login widget will magically appear.

Selecting the Appropriate User Agent
Selecting the Appropriate User Agent

For sure, this trick or hack is painful and the real solution will be to fix the website rather than to use dirty hacks. On the other hand, this issue is there since several months and has never been fixed by the company. This trick might also (unfortunately) help you when using other websites that provides browser-dependent content. If you are a web-designer, keep in mind that the content should just be compliant with the standards (such as the one from the W3C) and must not depend on a specific technology (such as a web browser).