mellowtel-inc / mellowtel-js

With Mellowtel, your users can share a fraction of their unused internet by using a transparent opt-in/out mechanism. Trusted partners access the internet through this network, and you get paid for it.
https://www.mellowtel.com/
GNU Lesser General Public License v3.0
49 stars 5 forks source link

Test/Implement Firefox support #3

Open mellowtel opened 7 months ago

mellowtel commented 7 months ago

Mellowtel is already tested and working on Chrome/Edge/Opera (all in manifest version 3)

We need to test/add support for Firefox.

The primary distinction lies in the implementation of the Manifest V3 (MV3) across various browsers, specifically between Google Chrome, Microsoft Edge, and Opera, as opposed to Mozilla Firefox. In Chrome, Edge, and Opera, under the MV3 architecture, background scripts are managed through Service Workers. These Service Workers are designed to terminate automatically once the browser identifies that the script has ceased execution. Conversely, Firefox implements a similar, yet distinct approach in its MV3 framework. Instead of employing Service Workers for background scripts, Firefox utilizes an Event Page, which offers a different method of managing script execution and resource allocation.

mellowtel commented 7 months ago

Note: Firefox still doesn't support credentialless Iframes. Since they are foundational to maintain privacy of the end-user, in the meanwhile we can check if the browser is Firefox and simply disable Mellowtel instead of throwing errors. This way, developers who use cross-platform deploys can keep doing so without breaking anything

mellowtel commented 4 months ago

Update: Firefox automatically blocks third party cookies, so the iframe becomes "credentialless" automatically if loaded into another origin