History of 2021-12-18 Automatically starting Firefox with a clean profile

2021-12-18
12:44 UTC Revision 1 . . . . mborkI am currently working on a side project, which is a very specific web application. One of the requirements is that several users should be able to be logged in simultaneously and interact with each other in real time. For the “real time” part, I use websockets (with the Socket.IO library, which is quite nice to work with). Today, however, I wanted to say something about a different thing: testing. Not automated testing (I will probably blog about it later, too), but good old manual testing. The trouble is, how do I log in as two (or more) users at the same time? I can’t use separate browser tabs, since they share cookies and logging in or out in one of them logs me in or out in all of them. It turns out that if you open several “private browsing” windows in Firefox, they all share cookies and similar data, too – that wasn’t obvious for me, but this is how it works. I could use separate browsers (say, Firefox and Chromium), but that is far from comfortable – and obviously scales very poorly. Of course, Firefox profiles are exactly what is needed here. They have one drawback: it takes a lot of clicking to create a new profile. (Also, you have to name it, keep track of your profiles, delete the ones you don’t need anymore…) So, let’s script it.