1. 36
  1. 9

    So, anybody else dumb enough to want to try writing a slimmer browser?

    Because it looks like that actually might be a good idea.

    You know, for sufficiently masochistic values of good.

    1. 9

      The problem is that I don’t think it’s possible. The kind of issues listed here, while stupid, are only a small part of what makes a modern web browser incredibly large. The work needed to performantly and correctly implement

      • CSS with all of the transforms, crazy selectors
      • A fast enough Javascript to effectively run all the tens of megabytes of JS that modern web apps will yank down
      • An efficient DOM that interacts well with the Javascript platform
      • A safe, fast, well sandboxed WebGL implementation
      • …and so on

      dwarf all of the system call stupidity listed here. I suspect if you do the work to implement a web browser fully, you won’t have anything much better than what exists today. It might not be spazzing out with useless system calls, but there’s so much other crap that you basically need that it won’t matter.

      1. 4

        I suspect if you do the work to implement a web browser fully, you won’t have anything much better than what exists today.

        That’s pretty much the heart of the matter. Hell, even IE6 is usable under many circumstances.

        1. 1

          The only reason why many of these browsers wouldn’t work today is because of modern TLS practices - v1.2, SNI, SHA-256, etc. Of course content is degraded, but it usually works. (unless it’s a SPA…)

      2. 3

        The sad news is that you’re not likely to actually avoid much of this even by just dropping a GTKWebView into a barebones window, which is what most “lightweight” browsers aim for. Maybe start with netsurf, but it’s almost completely broken by modern standards.

        1. 3

          Yup! goes off to implement a new web render engine

          Call me in a few decades :)

          1. 7

            Take the short route and become a servo committer!

          2. 1

            The suckless folks took a stab at it: http://surf.suckless.org/

            1. 4

              That’s just a slim wrapper about WebKit GTK. The surrounding chrome doesn’t do much, but WebKit itself will.

          3. 6

            Back to firefox, it appears to have an unhealthy obsession with looking around for its rival.

            Does anyone know why firefox is checking for a chrome installation? Is it sending that information somewhere for data collection?

            1. 8

              It’s probably for importing bookmarks.

              1. 9

                If it’s looking for bookmarks, scanning my $PATH for chrome seems an odd way to find them. The location where chrome keeps bookmarks doesn’t vary based on whether chrome itself lives in /usr/bin or /usr/local/bin.

                1. 2

                  Maybe it’s trying to decide whether chrome is installed before it goes looking for its bookmarks? Which is idiotic, of course, but purposeful and consistent with the behavior you observed.

                2. 5

                  It wants to import bookmarks every few seconds?

                3. 6

                  Some xdg fuckery? “Hey, looks like we’ve got some html. Are there any programs that can display this?”

                  I don’t run a desktop environment, but that doesn’t stop various programs from “integrating” with it. Usually I’m blissfully unaware that this is happening, but occasionally it bubbles up and things get downright strange, and then I know it’s time to delete all the configs.

                  1. 5

                    Just a guess: perhaps it’s related to the “Make firefox your default browser” question?

                  2. 6

                    hilarious :)

                    1. 5


                      This behavior reminds me of how chrome attempts to detect DNS poisoning attacks, e.g. if aslkdjakrgjalekrgjadlkjg resolves to something, then there is likely an attack underway. Maybe this is how they detect malware that tries to provide bogus certs to chrome? it would be easy to evade if so.

                      1. [Comment removed by author]

                        1. 2

                          Probably not many, the directory would live in buffer cache. Although it does require a linear search through existing entries. (Directories are only hashed when they get to be a certain size, so it may actually be faster to loop over a larger directory than a small one.)

                        2. 2

                          This is really interesting Ted.

                          I wonder if some of this weirdness (some obviously isn’t) is due to abstraction? A linear chain of abstracted API calls can easily hide repeated work.

                          Some stuff, like looking for another web browser binary, however, is just baffling.

                          1. 2

                            Sadly I could not replicate firefox’s search for chrome on my FreeBSD machine. I’m sure there is some subtle difference in what I did.