Live data from Hacker News

Keeping Safari a secret

donmelton.com

21–30 of 108 posts

Re: Keeping Safari a secret

#21

"Which explains why the Safari user agent string has so much extra information in it, e.g. KHTML, like Gecko — the names of other browser engines." Wasn't Safari/WebKit largely based on KHTML in the beginning? This doesn't say it wasn't, but seems to imply that there was a separation of the two that was more complete than it really was. I realize the OP is in a better position than I to know exactly what the reasonin…

At the time, Microsoft's hegemony over the web browser market was at its peak. Firefox was the only real competitor. If web pages checked the user agent, they probably only accounted for these two browsers. Anything else fell back to legacy behavior, disabling DHTML (later called Web 2.0). This made Gmail suck.

KHTML had almost no market share - it only ran on KDE, and most KDE users used Firefox. Nothing recognized its user agent string, so reporting "KHTML" would have been as ineffectual as reporting "Safari" or "WebKit".

Re: Keeping Safari a secret

#22

Earlier quoted context omitted.

That is exactly what he is saying. They added KHTML to the user agent string to improve compatibility with servers, since Webkit was essentially KHTML anyway, not to try to hide the actual user agent. Internet Explorer is what they used when hiding the user agent.

If he is trying to say that, then he has my sincere apologies, but it doesn't read like that, at least to me. eg. he says "the names of other browser engines", not "the name of the browser engine our code was originally based on". The "like Gecko" part is a bit of a red herring here and mostly irrelevant, as that is simply what KHTML/Konquerer used in its own UA ("KHTML, like Gecko").

The full quote is:

"That allowed me to tweak the string for maximum compatibility with the websites of that time. Which explains why the Safari user agent string has so much extra information in it, e.g. KHTML, like Gecko — the names of other browser engines."

I interpret that as KHTML and Gecko are names of other browser engines that are listed in Safari's user agent string for compatibility purposes.

Re: Keeping Safari a secret

#23

> We couldn’t ship with the real Safari user agent string disabled, but we came up with the next best thing — automatically enabling it after a certain date. Does that mean that if you set the date of your computer back before 2003, the user agent will become Internet Explorer?

If you were able to run a copy of Safari version 48, it would probably look like a Gecko-based browser before this date.

v38. You'd not see it with v48.

Re: Keeping Safari a secret

#24
post #21

"Which explains why the Safari user agent string has so much extra information in it, e.g. KHTML, like Gecko — the names of other browser engines." Wasn't Safari/WebKit largely based on KHTML in the beginning? This doesn't say it wasn't, but seems to imply that there was a separation of the two that was more complete than it really was. I realize the OP is in a better position than I to know exactly what the reasonin…

At the time, Microsoft's hegemony over the web browser market was at its peak. Firefox was the only real competitor. If web pages checked the user agent, they probably only accounted for these two browsers. Anything else fell back to legacy behavior, disabling DHTML (later called Web 2.0). This made Gmail suck. KHTML had almost no market share - it only ran on KDE, and most KDE users used Firefox. Nothing recognized…

"At the time, Microsoft's hegemony over the web browser market was at its peak. Firefox was the only real competitor."

Actually at the time this is referencing Firefox didn't exist (Gecko did, but Firefox didn't). I'm well aware of the history and why browsers trick out their user agents. If you want to go one level deeper, look no further than the fact that IE still pretends to be Mozilla because of the early days when they were late to the party.

Re: Keeping Safari a secret

#25

"Which explains why the Safari user agent string has so much extra information in it, e.g. KHTML, like Gecko — the names of other browser engines." Wasn't Safari/WebKit largely based on KHTML in the beginning? This doesn't say it wasn't, but seems to imply that there was a separation of the two that was more complete than it really was. I realize the OP is in a better position than I to know exactly what the reasonin…

Yes, WebKit was based on KHTML and KJS. Even in the beginning, we made a few fundamental changes. Some of those were folded back in, but eventually those differences grew much, much larger. There actually were some sites (in Europe, as I recall) that behaved a bit better when "KHTML" was in the user agent string. I also included it as a nod to the original project. I wanted to show respect for the fine work of Lars K…

That's quite the story, and it's great that you'd keep a reference to a products origins (even if you didn't have to).

On a side note, is it still true that Apple has an entire /8 block of IP addresses? I know that a variety of companies where given them, but I was under the impression that large portions of most had been bought back/given back for use elsewhere?

Re: Keeping Safari a secret

#26

Earlier quoted context omitted.

If he is trying to say that, then he has my sincere apologies, but it doesn't read like that, at least to me. eg. he says "the names of other browser engines", not "the name of the browser engine our code was originally based on". The "like Gecko" part is a bit of a red herring here and mostly irrelevant, as that is simply what KHTML/Konquerer used in its own UA ("KHTML, like Gecko").

The full quote is: "That allowed me to tweak the string for maximum compatibility with the websites of that time. Which explains why the Safari user agent string has so much extra information in it, e.g. KHTML, like Gecko — the names of other browser engines." I interpret that as KHTML and Gecko are names of other browser engines that are listed in Safari's user agent string for compatibility purposes.

Fair enough, I'm not trying to suggest this is some grand conspiracy, it just struck me as a funny phrasing given the shared history of the two layout engines.

Re: Keeping Safari a secret

#27
post #7

TLDR: for whatever reasons it was a very top-secret project, so they spoofed the user agent, the end.

Sometimes the backstory makes for a fun read. Looking for the cliff notes version all the time makes life boring.

Re: Keeping Safari a secret

#28
post #21

"Which explains why the Safari user agent string has so much extra information in it, e.g. KHTML, like Gecko — the names of other browser engines." Wasn't Safari/WebKit largely based on KHTML in the beginning? This doesn't say it wasn't, but seems to imply that there was a separation of the two that was more complete than it really was. I realize the OP is in a better position than I to know exactly what the reasonin…

At the time, Microsoft's hegemony over the web browser market was at its peak. Firefox was the only real competitor. If web pages checked the user agent, they probably only accounted for these two browsers. Anything else fell back to legacy behavior, disabling DHTML (later called Web 2.0). This made Gmail suck. KHTML had almost no market share - it only ran on KDE, and most KDE users used Firefox. Nothing recognized…

Firefox wasn't a big factor when Safari debuted. And the project was still called "Phoenix" back then. I believe that other Mozilla and Gecko-based browsers were more widely used at that time.

Re: Keeping Safari a secret

#29

Earlier quoted context omitted.

Yes, WebKit was based on KHTML and KJS. Even in the beginning, we made a few fundamental changes. Some of those were folded back in, but eventually those differences grew much, much larger. There actually were some sites (in Europe, as I recall) that behaved a bit better when "KHTML" was in the user agent string. I also included it as a nod to the original project. I wanted to show respect for the fine work of Lars K…

That's quite the story, and it's great that you'd keep a reference to a products origins (even if you didn't have to). On a side note, is it still true that Apple has an entire /8 block of IP addresses? I know that a variety of companies where given them, but I was under the impression that large portions of most had been bought back/given back for use elsewhere?

Apple still owns and uses the entirety of 17.0.0.0/8.

Re: Keeping Safari a secret

#30

If they were worried about server admins correlating Apple's IP addresses with a new User-Agent string, the team could have VPN'd to a non-Apple network to access the web.

I guess they were worried both about having recognizable IP addresses AND having the name of their new browser appear in logs all around the world.

The user agent was something like "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.5", which people would have quickly correlated to Apple, not matter what IP it came from.

Post reply on HN