Programatically detect Firefox Developer Edition

139 Views Asked by At

As my application is growing in size and complexity, I am adding debugging, logging, tracing and profiling points. I currently have different program switches to turn them off, and a master development swith to turn them all off when in production, and on in development.

It has occurred to me that to prevent accidentally publishing the version with the development mode switch on, I want to turn it off by default in any browser that is not Firefox Developer Edition.

So, How can I determine programatically if browser is Firefox Developer Edition specifically? I have inspected navigator.userAgent but it doesn't provide such information.

1

There are 1 best solutions below

2
On

Maybe a better approach would be to use a query string in the URL, this way you are quite sure only you, or someone who really wants to use the dev mode, is using it.