Reply to post: Firefox GeckoView

In case there was any doubt about using legacy Edge, Microsoft 365 throws its weight behind WebView2

Anonymous Coward
Anonymous Coward

Firefox GeckoView

In case you're unaware, Firefox has its own embedded browser to compete with WebView, known as GeckoView.

The big advantage of it, a) it is its a full browser in a view and b) it doesn't attached tracking headers, c) it runs javascripts as if they were assets, not as strings, which makes them easy to debug. Geckoview really is a full browser, Mozilla wrap it in a frame to form Firefox Android!

No "X-Requested-With" : So it's common for Chrome Webviews to be blocked because they're weird subsets used in custom apps, and so websites often just block them on mass by detecting the tracking header Google slaps on it with the app name in it, the "X-Requested-With" header. Webviews often don't work on sites that they should in theory work on.

Geckoview should be the fix, however GeckoView has a major issue. Unlike every other fooking Webview in the world, Mozilla guys decided you couldn't simply invoke Javascript directly from the wrapper. So no calling

view.evaluateJavascript(sStripPageOfFluff, ....

and running some javascript in the view context.

Instead they have Webextensions, which sadly only work if there is one Geckoview to control (because of the way they store the messagedelegate isn't per session and one view holds one session), and since these extensions are per domain (WHY WTF??) a page can fail to load, or get intercepted by an interstitial ad, or the javscript code crashes because of some unforeseen conflict, or whatever and that's the end of it, and then you've lost control of the browser wrapper because it didn't start the domain specific code.

The browser is brilliant when it works. A full Firefox, a proper browser, one that you can lock to a specific version to match your wrapper code. But its only great, just as long as you run ONE instance of the view, and reload the full page each time you lose control of it.

So no splitting Android tablet up into lots of browser panes, setting the pages up to show the important content in the frame. Stripping out all the ads and crap you don't want distracting you, none of that is possible. One view only.

From their comments, Mozilla devs think webextensions approach is better...

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2022