HistoryCleaner icon indicating copy to clipboard operation
HistoryCleaner copied to clipboard

Add Firefox for Android Support (History API is not available in Firefox for Android currently)

Open towlie opened this issue 3 years ago • 14 comments

Firefox Nightly for Android supports installing every extension by following their guide: https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly/

From what I have seen a lot of extensions work now. But this one doesn't. It installs but it's not able to delete the history. (No error message shown)

So I ask you if it's possible to make it work?

towlie avatar Mar 02 '22 02:03 towlie

The history WebExtension API does not seem to be supported in Firefox for Android (see this compatibility chart). The history API is (of course) needed to delete history. Once the history API lands in Firefox for Android, it should work. (Though the options page for the extension will need to be reworked. It's not at all optimized for mobile.)

Here's the error from the remote debugger in Nightly on desktop showing that the history permission is invalid: Screenshot from 2022-03-01 22-04-32

Rayquaza01 avatar Mar 02 '22 03:03 Rayquaza01

Thanks. So it will work without updating the extension if they add the history API to Firefox for Android.

towlie avatar Mar 02 '22 13:03 towlie

As an aside, if this extension ever does become compatible with mobile, it might be a good idea to file an issue over on the Iceraven github requesting that it be added to Iceraven's default add-on list.

Iceraven includes a ton of "extra" add-ons on its default list whereas Firefox stable only has perhaps a dozen or so, and Iceraven offers easy access to them without the weird "cheat code" type stuff you have to do on Firefox nightly like clicking an icon a certain number time times and a bunch of other stuff. So, Iceraven users are much more likely than users of any other Fenix based browser to explore beyond Firefox stable's core list, because you don't need any special knowledge to install any add-ons on the default Iceraven list while using Iceraven (Of which there must be 100 or so).

However, just as importantly for an extension developer, the Iceraven list is actually very popular among users of Fenix-based browsers other than Iceraven, who, if their variant of Fenix supports it, can and often do add in Iceraven's add-on list to their existing browsers. I've got to think people who go to enough trouble to add a list like that manually to their browser install are more likely to use some of the extra extensions than other users of the same browser.

Iceraven already includes "Expire History By Days" on it's list, so "History Cleaner", updated much more recently and providing similar functionality would be a popular slam dunk type of extension to add when everything matches up compatibility wise.

If the time comes when Mozilla allows this add-on the access it needs to the browser to do what it sets out to do, but no one else files an issue requesting that it be added it to Iceraven's list at that time, I can file an issue recommending they do so, provided that someone tells me what's going on. :)

  • Just FYI if anyone's wondering, Iceraven is a fork of Firefox that both combines stable versions of Firefox's components with all the stuff the actual Firefox only gives beta or nightly users long-term (Like about:config access and so forth) without any intent of uplifting it to Firefox stable, and also offers some extra options that no browser with the Firefox name offers on mobile (Like the ability to view full URLs all the time if you want, complete with protocol). Iceraven's goal is generally maximum options, customizability, and extendibility within the bounds of number of hours the main developer wants to put into it and how much help he's getting at any given time.

CharmCityCrab avatar Jan 18 '23 08:01 CharmCityCrab

Firefox Nightly for Android supports installing every extension by following their guide: https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly/

As does this fork:

https://gitlab.com/relan/fennecbuild/
https://f-droid.org/packages/org.mozilla.fennec_fdroid/

I'd change the title to "Firefox support" for clarity, to my knowledge the full addon support isn't intended as nightly-only feature.

ghost avatar Jun 16 '23 05:06 ghost

Iceraven already includes "Expire History By Days" on it's list

@CharmCityCrab Which presumably doesn't currently work on Firefox Android due to lacking mobile history API?

https://addons.mozilla.org/en-US/firefox/addon/expire-history-by-days/

ghost avatar Jun 16 '23 05:06 ghost

I'd change the title to "Firefox support" for clarity, to my knowledge the full addon support isn't intended as nightly-only feature.

Firefox supports significantly fewer than twenty add-ons for use on their stable Android browser (Up from seven a few years ago, but down from thousands just prior to a few years ago).

Though you can use their complicated secret formula to get access to more extensions on nightly (Their most unstable release) and they were talking about expanding it to their beta browser (and may have done so), they have not expanded it to the stable browser and to my knowledge have announced no plans to do so in the future. They've been pretty clear about their lack of interest in giving users what they want when it comes to extensions.

When they first cut down to 7 extensions in the summer of 2020, they said almost all of the old extensions couldn't be made to work with the new version of their browser even if developers rewrote the browser code a bit. This was untrue. Iceraven's lead developer made a working browser based on the then-latest Firefox browser in just a couple hours that supported tons of extensions. Then the Firefox people said more extensions were coming to their browser and, well, it's been three years, and it's maybe a dozen total- something like that.

In those three years, Firefox eventually did add broad extension support for Nightly, but with tons of caveats like Mozilla accounts and all sorts of extra steps, as well as defacto capping the number of users who could access the extensions by not having most of them work with their most popular browser, making continuing ongoing support from extension developers less likely.

They also made it clear that including it in Nightly did not mean it was a feature they intended to have filter down to stable eventually, the way most things in nightly are at least being considered for. Instead, there were insinuations that extensions in general are too complicated or insecure for the average user to be trusted with beyond a very small very curated number. Really, they are using extensions as bait to force you to test the not ready for prime time aspects of their browser on an ongoing basis.

Iceraven, a fork of a Mozilla product but made independently, is based on the stable version of Fenix (The code name for Firefox 69-the most recent version and beyond), includes some of its own exclusive customization options, and offers easy to use straight out of the box access to 50-100 extensions and about:config without jumping through any hoops.

With that said, I think it's possible to do the same thing Firefox Nightly users do to get access to an even wider set of extensions on Iceraven. Of course, that would involve doing all the same things Firefox requires of it's nightly users, including keeping a Mozilla account on the web with all your extensions listed. Iceraven offers the largest list of extensions that are just there to add- no account sign-ups or hoop jumping required. In fact, a lot of users of some of those other browsers input the number identifier of Iceraven's custom list of extensions, because Iceraven's list is considered that good. Similarly, Iceraven users could input a different number identifier of a different list of extensions in if they wanted to, but usually don't.

CharmCityCrab avatar Jun 16 '23 06:06 CharmCityCrab

@CharmCityCrab Thanks for the reply. To me one of the largest issues in Firefox Fenix is the inability to always use the private browsing mode (it's common to accidentally open standard tabs), and clearing cookies & site data requires pressing 'quit' in the menu. But at least there's the option to automatically close tabs (after X days)...

If you happen to know an Android browser which can automatically clear the website data, I'm very interested. I also prefer saving no browsing history on mobile.

ghost avatar Jun 16 '23 06:06 ghost

Which presumably doesn't currently work on Firefox Android due to lacking mobile history API?

@07416 I just double checked this, and no, Expire History by Days (and by extension, History Cleaner) does not work on Iceraven. The history API is still missing and it shows the same warning as Firefox Nightly in the remote debugger.

Rayquaza01 avatar Jun 17 '23 14:06 Rayquaza01

Since the mainstream Android app now allows any (supported) extension to be installed too, please edit Nightly out of the title of this issue.

ghost avatar Jun 06 '24 18:06 ghost

This is the Bugzilla issue you need to watch: https://bugzilla.mozilla.org/show_bug.cgi?id=1330161

ghost avatar Jul 18 '24 18:07 ghost

Hi, I recently saw that FoxyProxy has a button to clear your history. When you click on this, Firefox Android asks you whether you want to give FoxyProxy permission to clear your history. So there seems to be a way now to implement this on Android.

eylenburg avatar Jul 15 '25 10:07 eylenburg

@eylenburg FoxyProxy uses the browsingData API (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browsingData), which is supported on android. browsingData only supports deleting recent history, not old history.

Rayquaza01 avatar Jul 15 '25 13:07 Rayquaza01

What does "recent" mean, how many days? If you manually delete your history once and let HistoryCleaner delete your history daily ("0 days to keep") this would still be useful, though maybe more as a limited "HistoryCleaner for Android" version.

eylenburg avatar Jul 15 '25 14:07 eylenburg

@eylenburg Recent means it can only delete history after a given date. History Cleaner deletes history before a given date. So, it does the opposite of what's needed for this extension.

BrowsingData can delete all history, so a lite version that deletes all history would be possible. But there's a setting in Firefox for Android (Delete browsing data on quit) that can automatically delete all browsing history when you close the browser, so you can pretty much achieve the same thing without an extension.

Rayquaza01 avatar Jul 15 '25 15:07 Rayquaza01