29

For some reason, When I click view page source on an "empty" new tab in Firefox 55.0.2, there's bunch of HTML stuff (which I don't really care about).

However once I see:

<script type="text/javascript" src="chrome://browser/content/contentSearchUI.js"/>
<script type="text/javascript" src="chrome://browser/content/newtab/newTab.js"/>

In there my alarm bells go off. Why is there javascript? What is this?

Why is it there in the first place? (a supposedly EMPTY NEW TAB).

Why is there a reference to "chrome://browser/". What's going on?

BoffinBrain
  • 2,096
  • 16
  • 19
JBeurer
  • 469
  • 7
  • 13
  • 41
    "chrome" was generally used to refer to GUI interfaces (in browsers, specifically the browser UI portion) considerably prior to the existence of Google Chrome. Google *chose* to name their browser with the generic term, thus causing no end of confusion. This choice may have been just because they thought it sounded good. However, given the effects, there are many less benign hypothesizes as to the reason for the choice (e.g. they were lazy/unimaginative; deliberately benefit from people thinking the existing and continued use of the generic term "chrome" is referring to Google Chrome; etc.). – Makyen Aug 24 '17 at 17:39
  • 10
    @Makyen that would be a great answer. There's a big field at the bottom of the page that says "Your Answer", you should type it there. – THE JOATMON Aug 24 '17 at 19:31
  • 12
    It's just like [user agents all start with `mozilla`](https://stackoverflow.com/q/1114254/995714) even though those browsers have no relation to Firefox at all – phuclv Aug 25 '17 at 01:53
  • 1
    See also: https://superuser.com/questions/517160/why-does-firefox-use-the-chrome-protocol-schema-in-urls – Bob Aug 25 '17 at 06:54
  • "chrome" means "shiny". https://www.youtube.com/watch?v=mhm-4kDBhio&t=44s – Agent_L Aug 25 '17 at 09:27
  • 1
    See https://superuser.com/questions/364664/what-are-the-chrome-and-resource-protocols-in-firefox – bwDraco Aug 26 '17 at 16:09

2 Answers2

48

@Darren nailed the reason why it's called 'chrome'. In Firefox's case, that's the general term for browser UI they've been using for over a decade. Only Firefox and addons can load chrome:// URLs.

To answer the other part of your question, unlike in ancient versions of Firefox, a New Tab page is not a truly empty page. It actually has a location: about:newtab - not about:blank. If you look at the top right, you may see a cogwheel icon. You probably have yours set to 'Show blank page'. However, you can always toggle it back to show your top sites, so that's why the scripts are there.

enter image description here

Stevoisiak
  • 13,555
  • 39
  • 101
  • 154
BoffinBrain
  • 2,096
  • 16
  • 19
  • 2
    Is there a way to get a "real" about:blank then? – JBeurer Aug 24 '17 at 12:41
  • 1
    Unfortunately I don't think you can configure that in Firefox any more (see https://bugzilla.mozilla.org/show_bug.cgi?id=1118285). You may be able to find an addon for it, but otherwise, you'd have to manually navigate to `about:blank` – BoffinBrain Aug 24 '17 at 12:45
  • 2
    There [seem to be plugins that do that](https://support.mozilla.org/en-US/questions/1087442) – JAD Aug 24 '17 at 14:04
  • The link above also includes a/the reason Mozilla made this change. – JAD Aug 24 '17 at 14:06
  • 3
    Malware is why we can't have nice things. – BoffinBrain Aug 24 '17 at 14:36
  • 29
    Your answer implies that using "chrome" to refer to the browser UI is a Mozilla/Firefox specific term. In reality, "chrome" was generally used to refer to GUI interfaces, and browser UI specifically, well prior to the existence of Google Chrome. Google *chose* to name their browser with the generic term, thus causing no end of confusion. Please [edit] to clarify that it's not just a Mozilla/Firefox term. – Makyen Aug 24 '17 at 17:24
  • Note: The user can also directly load `chrome://` URLs by typing them into the urlbar. – Makyen Aug 24 '17 at 17:25
  • 1
    @Makyen Yes, both those things are very true. I just didn't want to go too in-depth about it because I didn't want to duplicate Darren's answer below. – BoffinBrain Aug 25 '17 at 09:22
  • A decade? Closer to 20 years, at least. The term has been used since the very earliest days of Mozilla - here's a Slashdot story from 1998: https://tech.slashdot.org/story/98/10/03/1022230/mozilla-gets-custom-chrome. I think it was also used by Netscape earlier in the Navigator/Communicator days, but I can't find a good dated source. – nobody Aug 29 '17 at 13:35
  • @Makyen Can *you* show a dated source (i.e. from before Netscape even existed) that defines "chrome" as a generic term for a GUI interface? – nobody Aug 29 '17 at 13:36
32

Answering part of your question, chrome in this instance is a reference to the parts of the browser interface surrounding the page (see here for more info).

In the context of a web browser it is the navigation, toolbar etc.

In the context of a website it is navigation, ad-space and other fixed aspects of the design.

The term "user interface chrome" is synonymous with "graphical user interface" or GUI for short, a term you are probably more familiar with.

It’s just unfortunate that Google’s browser happens to share the same name.

Darren
  • 2,722
  • 1
  • 18
  • 31
  • 13
    I knew this would start becoming an issue as soon as Google gave their browser a name, many years back. – BoffinBrain Aug 24 '17 at 12:21
  • On the first glance, I thought that chrome upon install, has somehow sneaked itself into Firefox, installed some-part of it as an extension - and are probably phoning home - the text entered into address bar or something – JBeurer Aug 24 '17 at 12:39
  • 11
    I don't think Google's browser "happens to share the same name." I'm pretty sure Google directly named their browser "Chrome" after the browser term. While working on the chrome, they decided it sounded like a cool name for the browser. – trlkly Aug 24 '17 at 14:55
  • 3
    @trlkly Not sure about that though... Google Chrome is based on [Chromium](https://en.wikipedia.org/wiki/Chromium_(web_browser)), the open-source version named from the chemical element: [chromium](https://en.wikipedia.org/wiki/Chromium). – Andrew T. Aug 24 '17 at 15:57
  • 4
    @AndrewT. But between the names "chrome" and "chromium", "chrome" seems to be more relevant to browsers in general. Google probably decided on "chrome" for the closed-source variant it was going to market, and then named the open-source variant it was going to be based on, "chromium", to make it similar to "chrome". – JoL Aug 24 '17 at 16:11
  • 2
    @jlmg but according to [Wikipedia's disambiguation page on Chrome](https://en.wikipedia.org/wiki/Chrome), it's [a term for UI part of a window (not specifically about browser)](https://en.wikipedia.org/wiki/Graphical_user_interface#User_interface_and_interaction_design)... – Andrew T. Aug 24 '17 at 16:15
  • @AndrewT. it still seems more relevant than the element chromium... – JoL Aug 24 '17 at 16:16
  • 8
    trlkly is right, @AndrewT. they explained on their release that they chose this name because they focused on minimizing the amount of browser UI. Glen Murphy, from Google, gives on https://www.quora.com/Why-is-Chrome-called-Chrome a more detailed answer, and noting other reasons why it may have been kept. – Ángel Aug 24 '17 at 18:40
  • 1
    Yes, I'm pretty sure they mentioned one of the goals was to have a minimalist user interface (the chrome) compared to other browsers of that era – just search for screenshots of Opera 10 or such. (I think it also started a theme: you see very little chrome in Chrome's UI; you can't see the pixels on high-res Pixel laptops; the Glass has no actual eyeglasses...) – u1686_grawity Aug 24 '17 at 19:02
  • 2
    [Yes, minimizing the standard window "chrome" was an explicit design goal of Google Chrome](https://www.google.com/googlebooks/chrome/big_24.html). – Cody Gray - on strike Aug 25 '17 at 06:29
  • 6
    @AndrewT. Chrome came first. Chromium is named after it. (in both browsers and chemistry) – OrangeDog Aug 25 '17 at 10:33
  • 5
    Since I haven't seen it mentioned elsewhere and it appears that people are having trouble understanding the origins of the term, the usage of "chrome" (lower case) to refer to the more decorative, non-business-related bits of an app (such as the UI) comes from analogy to automobiles. The decorative chrome on a car exists only because users like shiny bits. It's completely unrelated to the important parts (e.g. the engine) but because it's highly visible to the user it influences their opinion of the car. (n.b. chrome isn't as popular on cars as it used to be; the analogy is showing its age) – A C Aug 25 '17 at 17:24
  • 2
    Ironic that Google Chrome's design goal was to minimize chrome. – jamesdlin Aug 26 '17 at 01:25