Difference between "Never remember history" and "Incognito Mode"

I am working on an addon that has different behavior when a user is in incognito mode. However, from a latest user report, I found out that extension.inIncognitoContext returns true if the history setting is set to “never remember history”. Is there any way to know whether a user is on “never remember history” rather than incognito?

Thanks!

Not sure if this is true, but it sounds logical:

Firefox only has a single background page for normal and incognito mode (which incognito context pages can’t access via .getBackgroundPage().
So I’d think that only if the user us in “never remember history”-mode, that page would have extension.inIncognitoContext set to true, which I’d assume would mean that incognito mode pages can grab it.

1 Like