Live data from Hacker News

Ask HN: If you could reinvent the web browser, what would you do differently?

news.ycombinator.com

21–30 of 39 posts

Re: Ask HN: If you could reinvent the web browser, what would you do differently?

#21
Every page is written in markdown (without html), extended to support forms and embed videos and images. You can just look at content, click links, send form data. Websites can only provide content, the style is specified by the user. Clicking a button won't run untrusted code on your machine.

Re: Ask HN: If you could reinvent the web browser, what would you do differently?

#22
post #12

Use standards, that's enough. And avoid that a random Corp create the next unaccessible thing and force it down to everybody and avoid support for not standardized / proprietary technologies

So, you feel the web should be more simplified? Or is it more that you want to keep the complexity, but also want good standards to be followed across all browser vendors (e.g. banish CSS prefixes and Chrome-only JS APIs etc)? What about the wide range of web apps the new APIs enable? Do you think they should be catered for somehow?

Having standards does not imply no more new APIs. But creating them only for one browser doesn't bring progress on the web but rather lead to monopoly and at the end inaccessibility.

Consider that with chrome (and chromium based browser) we're close to the situation we had back in the days with IE.

So I'd say open standard definition for web API should come first, later each browser will have their own release process to include them inside but at least behavior and aspect are defined upfront and this will avoid lots of issue

As of today for example and I'm using both Firefox and Chrome daily. You'd be surprised on how many website have been tested only in Chrome and some stuff do not work in Firefox at all

Re: Ask HN: If you could reinvent the web browser, what would you do differently?

#24
post #16

I'm actively exploring/implementing this, which has shaped my thoughts on the topic. 1. I'd have the browser recommend apps to install to open otherwise unsupported MIMEtypes & URI schemes. I think most desktops support this now (certainly FreeDesktop.Org-compatible Linux & BSD ones do via "AppStream"), it'll free webdevs from compatibility worries, & allow low-cohesian features like videoconferencing & (like brimste…

>7. Drop support for CSS `position:`, there's better alternatives now & it does more visual harm than good

Tell me an alternative to flexbox scrolling with "position: absolute; left: 0; top: 0; bottom: 0; right: 0".

I do agree "position: sticky" and "position: fixed" are harmful though.

Re: Ask HN: If you could reinvent the web browser, what would you do differently?

#25
post #12

Earlier quoted context omitted.

So, you feel the web should be more simplified? Or is it more that you want to keep the complexity, but also want good standards to be followed across all browser vendors (e.g. banish CSS prefixes and Chrome-only JS APIs etc)? What about the wide range of web apps the new APIs enable? Do you think they should be catered for somehow?

Having standards does not imply no more new APIs. But creating them only for one browser doesn't bring progress on the web but rather lead to monopoly and at the end inaccessibility. Consider that with chrome (and chromium based browser) we're close to the situation we had back in the days with IE. So I'd say open standard definition for web API should come first, later each browser will have their own release proces…

>Consider that with chrome (and chromium based browser) we're close to the situation we had back in the days with IE. >So I'd say open standard definition for web API should come first, later each browser will have their own release process to include them inside but at least behavior and aspect are defined upfront and this will avoid lots of issue

Just a sheer complexity of the layers being deposited during the current and the previous century makes it impossible for a single person to understand all the possible interactions. So today's situation with chromium-based browsers differ from IE in that the latter deliberately went against existing standards while creating many non-standard features.

In the last years google set a course for putting more and more features into browser so no other browser can catch up quickly enough. And despite the fact google actually tries to be standard-complaint and to create standards for their new feature, but only a large corporation is able to implement those features e.g. Mozilla.

Re: Ask HN: If you could reinvent the web browser, what would you do differently?

#26
post #10
post #8

I'd have web widgets. No reason every website needs to take up the full window

So the ability to tile windows into a single screen, without them sharing the same context? Perhaps, like a bunch of iframes containing their own "web page", but with the control over how the frames are arranged given to the user?

Yeah similar to that. E.g. I could have a window that shows weather from one website, twitter feed, youtube, whatsapp/fb messenger. Ideally they could interact (with user control).

Re: Ask HN: If you could reinvent the web browser, what would you do differently?

#27
post #17
post #10

Earlier quoted context omitted.

So the ability to tile windows into a single screen, without them sharing the same context? Perhaps, like a bunch of iframes containing their own "web page", but with the control over how the frames are arranged given to the user?

This is what the new portals api is about

Is that this https://wicg.github.io/portals/?

Re: Ask HN: If you could reinvent the web browser, what would you do differently?

#28
I'm pretty sure today's web is going at least two different directions that can't be easily merged together. On one side we have textual and basic graphical data that is supposed to be controlled by user, like resizing, scaling, copying, bookmarking, drag and drop, and so on. On the other side we have interactive applications supposed to work strictly as-designed with complex handling of internal state, like Adobe Flash or HyperCard did. When you merge those completely together you get a frankenstein, when you kinda have the content controllability until you don't, when the content is displayed as designed if you are lucky enough.

I would like to remind you the whole reason for creation of Angular/React/Vue/Polymer/etc — that is because you have this overbloated DOM which is slow despite being implemented in fast low-level compiled languages. The main reason is complexity of calculation of inline elements (text and images with wrapping) and two-way propagation of size (parent to child and child to parent). At the same time the whole idea of CSS as a customizable style description (similar to LaTex/MS Office/OpenOffice styles) is completely forgotten while becoming inseparable from the rest of the content e.g. visibility styles, inability to show the content in different sizes, etc. And now we need workarounds like Webpack and HTTP/2 for putting together separate files that are not so separate by their functions. Because, in fact, a simple textual HTML is separate, its CSS is separate, but dynamic application within this page is a single entity composed of html+styles+js+images — similar to adobe flash swf blob.

I've been writing native GUI apps for like seven years, but now I write web SPA, and the more I write them, the more I feel like today's HTML is not a good platform for true GUI application, because within DOM simple GUI things have to be implemented as complex entities. Yes, we got a flexbox which makes positioning much simplier than float blocks or scripted positioning. However, we also got "display: grid" and "column-width" which also implement flexbox-like behavior, but slightly different. In the end it doesn't matter how many layout mechanism we are going to have — it will never be enough.

Recently we got HTML5 canvas, including WebGL, but we got no good language to write the program for this canvas. Actually, WebGL is the closest to the double-world model of web browser I'm trying to suggest, because WebGL uses a separate high-performance shader language to describe the WebGL-canvas logic which is uncoupled from the main web page's logic. We can also render from a webworker into WebGL canvas, and chromium supports OffscreenCanvas capable of webworker rendering. However, both 2D canvas and WebGL lack one important thing — two-way composability i.e. include html page into canvas. Just like native GUI apps struggle with including native elements into internal browser, canvas struggles with including web browser into 2D or WebGL context.

Actually, Microsoft once solved this problem by implementing support of custom elements in the IE browser, thus bringing a two-way composability. However, due to windows-only nature of the solution it had not achieved wide acceptance. Some cross-platform execution environment is required for success, like JVM or CLR — WebAssembly being the most relevant today, but the composability problem has to be solved. Until then, the developers would still prefer to keep the composability by avoiding HTML5 and clinging on the old DOM as long as they can.

And by the way, speaking about cross-platform runtime. JVM, CLR, optimized JS, WebAssembly, and non-native-architecture VM have similar performance, so it's really not the fundamental execution speed that killed Java applets, but a failed GUI model "every pixel is drawn by JVM bytecode". WPF, UWP, JavaFX tried to fix the issue, until "everything is web" came.

Now about a second small idea I have and I've been struggling with for many years of web surfing. Bookmarks, history, and tabs are not separate things. The gap between them is closing but closing very slowly. We are getting web services that live between pages, we are getting frequently visited pages as a kind of bookmarks, we are getting cheap tabs that are loaded only when user switches to them, but nobody is brave enough to erase the separation and create a single visited-tab-bookmark entity. Today's computational resources clearly allow us to save some amount of data about every visit without forcing the user to be a bookmark keeper, especially when the user has no convenient tools for managing current tabs he's working with, and as for me I work with 50-300 tabs daily, so it's really a pain to manage them with this "ten tabs on the screen"-oriented tool modern browsers have. I know tree-like tabs exist, but usually they have their own issues. I'd prefer to open the tabs in a full-screen view, preferably with preview. Some people in the older days would save onto HDD every page they visit — they had a struggle sorting all the crap they've got.

Re: Ask HN: If you could reinvent the web browser, what would you do differently?

#29
post #28

I'm pretty sure today's web is going at least two different directions that can't be easily merged together. On one side we have textual and basic graphical data that is supposed to be controlled by user, like resizing, scaling, copying, bookmarking, drag and drop, and so on. On the other side we have interactive applications supposed to work strictly as-designed with complex handling of internal state, like Adobe Fl…

Thank you for this incredibly detailed answer. I too am an SPA guy, specifically because I like the clean separation between data and presentation they allow, which HTML simply doesn't.

This was exactly the kind of answer I was looking for when I asked my question, so thanks again!

Post reply on HN