Posts Tagged ‘firefox’

No Comments

Fixing Firefox: Failed to register/update a ServiceWorker for scope

Saturday, February 1st, 2020

For users that take privacy serious, Progressive Web Apps and the Push API and Notifications API are a real headache. They offer good performance and service, but privacy wise they are not that nice. Something like a supercookie. You like them but somewhere you know, you don’t really want them.

So in Firefox, Service Worker APIs are hidden and cannot be used when the user is in private browsing mode.

But also when users have Delete cookies and site data when Firefox is closed checked, sites can not register a Service Worker.

An error in the Javascript console will show up:

Failed to register/update a ServiceWorker for scope ‘https://domain/path’: Storage access is restricted in this context due to user settings or private browsing mode.

SecurityError: The operation is insecure.

Most solutions  suggest that the user should change or uncheck that setting, but that is not necessarily needed. A better solution is to create an exception for a that particular site. Like there own. Or they want a limited set of sites they trust to enable service workers.

Press the Manage Permissions button and add an exception for your domain.

That way you can use Progressive Web Apps or service workers on a selected collection  of trusted sites, and still keep your privacy settings on a high level.

 

No Comments

How to run Firefox headless and make a screenshot

Sunday, October 8th, 2017

Coincidence or not since version 57 Firefox supports a headless mode. Chromium also introduced this feature at version 57.

firefox --headless --screenshot shot.png https://dev.webonomic.nl

Will run  without GUI and put a screenshot in your working directory called shot.png. If you omit to specify the a filename, the default is screenshot.png.

Since Firefox stable is now at version 56, you’ll need Firefox-developer for now to get this working.

Another nice thing is the format of the screenshot that is created. For width it will take the device-width, the resolution of your desktop, but it will render a full website, 100% height, sot it will output the layout-viewport, not just the visual viewport.

To get the visual-output you need to set the window size option:

firefox-developer --headless --window-size 360,640 --screenshot https://dev.webonomic.nl

This will create a responsive layout (mobile phone Galaxy S5 dimensions) for this website.

For the moment only the  png format seems to be supported. If you try saving to a screenshot.jpg file you’ll end up with a png file called screenshot.jpg

User-agent Firefox –headless

Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

this is actually the same User-Agent as manually running Firefox as a browser. I take that as a plus; if we want the Internet of Things (IoT), it should be a democratic Internet of Things.

 

 

4 Comments

Install Android browsers without Google Play

Monday, March 13th, 2017

Android is the most used operating system for phones. Unfortunately software updates for android phones are not always available nowadays, so the only way to keep your phone secure and up-to-date, is to use a community driven version of Android.

Well, Android is open source, so you can always build something like LineageOS to get a recent version of Android for your device.

I certainly can recommend that. Even older phones are running quite nice, especially when all the proprietary (Samsung/Google) stuff is not installed. Don’t flash GAPPS and your phone feels like new.

Of course that means you don’t have something like Google Maps, but safety has a price, and to be honest, OsmAnd Maps is an excellent replacement.

Software for Android phones outside Google Play store

So now you have a recent LineageOS Android version on your phone, now you need software. You can use the F-Droid repository full of FOSS (Free and Open Source Software).

F-Droid

Opera Browser for Android outside the Google Play Store

You can find the Opera Browser, both the Mini, Mobile and the Opera Android version here:

https://www.opera.com/mobile/download/versions/

Firefox Browser for Android outside the Google Play Store

Firefox for Android is the only mobile browsers that has support for extensions. I can really recommend it.

You can find the Firefox browser, the apk package  here:

https://www.mozilla.org/en-US/firefox/android/all/

If you want to try out a beta version of Firefox for Android, you can find it here:

https://www.mozilla.org/en-US/firefox/android/beta/all/

And Firefox Aurora, the nightly builds:

https://www.mozilla.org/en-US/firefox/android/aurora/all/

When you use Android AOSP, you can have a hard time finding the right browser for your device. Don’t ask me why, but all those links are more or less unfindable, because they are hidden from search-engines.

<meta name="robots" content="noindex">

Hope we can help.

Android AOSP is a great operating system for phones, and more or less the only way to use an Android Phone safe and secure for more then two years.

UPDATE

Firefox seems to change/hide direct download links for their Android browser. I guess Google is making the rules, and forbids public downloads.

Google is getting a pain in the ass here, why are they discouraging people to run 100% transparent open source software: Google that behavior is doing evil!.

There is always the FDroid Firefox version, I can recommend that.
https://f-droid.org/packages/org.mozilla.fennec_fdroid/

And of course there is the public development on Github, which offers releases as well:

https://github.com/mozilla-mobile/fenix/releases