For a new project I wonder how much simpler (or secure) a browser could be made if you only allowed a subset of js and browser apis.
I’d wildly guesstimate for 70% of use cases you wouldn’t even need 50% of stuff with some slight modifications. The web is just so bloated.
Edit: might as well prune down the css a little too and maybe dump wasm, webgl and canvas
The problem with targeting a subset is there's a ratchet effect with web APIs, once support reaches critical mass in the major browsers sites will start unconditionally relying on those features and there's no going back from there, any new browser has to also support those features or be considered broken.
I suppose anything that's gated behind a permission prompt in Chrome/Firefox/Safari could be culled without too much trouble at least.
> The problem with targeting a subset is there's a ratchet effect with web APIs
What about starting a new web then only for the supported subset?
Based on my current browsing experience, this may be a plus in the long run.
There are now 3 competing standards.
You really just need two to see the positive effects, but three would be fantastic.
The problem is convining anyone to write a website in this. You will have like 3 sites that use only the subset.
The closest example is AMP, but you must be Google to force people to use it.
> The problem is convining anyone to write a website in this
Could choose a subset that lets certain sites that do not get on everybody's nerves still run fine.
For the remainder, people who need it can run an extension that runs a Chromium converting what's possible to the target subset.
Do you want to support YouTube? You want to support YouTube, don't you? Any big FAANG site probably uses most of the possible features.
> You want to support YouTube, don't you?
Of course no. You can use a bloated browser for that.
Then nobody will ever use your browser. Simple as that.
I think people forget the early 2000s. Many sites only worked on IE but Firefox was the better browser. Firefox users had an extension that would open certain links in IE or open the current page in IE via the context menu.
If a lightweight browser could be significantly faster and more secure, people would tolerate using two browsers again. Although Ladybird hasn't reached that bar.
YouTube certainly could use a small set of web standards, although YT regularly breaks on Firefox. It's a video player with links and forms.
> YT regularly breaks on Firefox
Source? I've never had a single problem ever, and I don't know anyone else that has either.
Sure, here's a couple mentions from just the last ten days. Loads more if you search around.
https://mapstodon.space/@hareldan/112619447620823614
https://techhub.social/@weston/112607264644039009
https://pdx.social/@crowdotblack/112604055589800602
https://social.bitwig.community/@gerotakke/11263106899010552...
YouTube has a vested interest to work best on Chrome.
It doesn't need to be mainstream, that will probably ruin it anyways.
So long as I can query the site for videos of interest and spin them up under mpv or VLC we're tots fine.
A surprising number of websites work fine without js.
Basically none of the ones I use look or work normal without it.
Websites with text content maybe, but the web is full of webapps which require JS.
This is more or less the idea behind projects like the Gemini protocol [1].
It's even deliberately designed to not be easily extensible, as to avoid the temptation of adding features.
[1]: https://en.wikipedia.org/wiki/Gemini_(protocol)
There is a reason that Esperanto or one of it's siblings is not the language of global understanding and we are discussing in English. The world at large generally does not care about these kinds of fancy. It's half a miracle that we agreed to whatever the Chromium engine implements to be a baseline that most folks build stuff on.
Given that a browser is not practically a virtual machine and/or an OS, it is not too surprising that an OS developer is not scared by the task. At the same time, it seems to me that multimedia is a whole different beast.
> For a new project I wonder how much simpler (or secure) a browser could be made if you only allowed a subset of js and browser apis
IMHO the only viable subset is the empty set. There are some surviving HTML-only browsers that are still usable for e.g. viewing documentation or browsing simple-minded websites (like HN, but they are fewer and fewer every year, unfortunately).
I really don't want to drop the all too common negative comment - in particular since I already use an alternative web browser - but the initial investment required just for an MVP seems mind-boggling to me.
I think a basic HTML browser that can automatically delegate all it cannot handle to other apps - PDF viewing to a PDF viewer, video playback to a video player, and JS-requiring things to a big browser - would be interesting (if it already exists, please let me know).
>IMHO the only viable subset is the empty set. There are some surviving HTML-only browsers that are still usable for e.g. viewing documentation or browsing simple-minded websites (like HN, but they are fewer and fewer every year, unfortunately).
I'm curious if throwing out DOM/js would make the task more approachable. My intuition says yes. But I'm thinking CSS would still make it super difficult. Also I've heard that HTML has some rough areas that make it hard.
That being said I find Netsurf is pretty capable even if I don't really use it very often. Yeah some pages don't render right but it's really fast. So who knows maybe we can get away with a reduced set of features or better yet go back to using separate clients instead of web apps for things like chat, email and forums.
I've been wanting something like that, like a wrapper that hosts three or four engine, so I can use normal for every-day, upscale to FF for some or Chrome for others - all in one UI.
I think this is a great point. The majority of my browsing uses text oriented sites (some think they are more, but I read them in reader mode). As I user, I rarely want more. I'd use a slim, secure browser if I could.
Sometimes I play games, or use "web apps" and using a different tool in those instances would be fine. Back in the early 2000s I remember using Firefox with an "open in IE" extension that allowed me to primarily use FF and fall back to IE when sites were broken. As websites modernized I used the extension less and less.
Also consider desktop apps that use election. Bundling a simpler browser and building the app to the capabilities of that browser could greatly reduce install size and memory usage.
If it only does 70% of what a regular browser does would anyone (seriously not as an experiment) use it on a daily basis? Most people just want to get on the web and go. They don’t care how big their is on disk or how much ram it uses (within reason of course), but the first time it doesn’t render their bank page or Jira page, they will drop it. Obviously I’m not talking about beta testers here or curious web devs.
The conversation regarding restrictions on the feature set within the browser always focuses on the browser itself, but there is definitely an opportunity to rally website makers. If Google or Apple came out and said we have a reduced feature set you can use that makes our browser render your website faster it would be a good opportunity, and I think many website makers would jump at the opportunity. A sort of Google AMP, but good! Let's call it Strict HTML.
> Edit: might as well prune down the css a little too and maybe dump wasm, webgl and canvas
Alternative idea: go the other extreme and stop pretending modern browsers are anything else than virtual machines. Turn browsers into sandboxed VMs that only run Wasm, with backwards compatibility ensured by shared wasm libraries that render HTML and run JS.
This is so wildly wrong it hurts. As soon as that one important website (to your user) breaks, they will switch browsers.
Just deciding that you don't want to implement >50% of web specs "for simplicity" and expecting that to be a winning strategy is very HN.
To me it’s not wrong at all, why won’t a simpler browser with a “modern mode” rendering succeds? There is no need for that browser to support the space jam website, who really cares? Imo thinking that people need quirks mode because they need to visit old website it’s very HN.
It's not that at all. Imagine some popular website is relying on some weird quirk but it works out in modern browsers. They don't even know they are broken, or in what way, and first discovering the issue and then investing in fixing the issue for <1% of readers is a very difficult cost to justify.
In context we are in [0], is space jam website really the problem? Old space jam website is just bunch of tables and images. It is the "modern mode" that is bloated.
[0]: https://news.ycombinator.com/item?id=40748071
The "very HN" thing for me is assuming a "winning strategy" has to be mass adoption. There's room for a smaller web full of nerds and geeks, we had that before and maybe we can have it again.
Indeed, that's why we are discussing on HN, not on Reddit. Exclusion as a design choice.
This is what Sciter, Lexbor or litehtml are aiming for.