20

Is it necessary to test the rendering of my website in both Chrome and Safari despite the fact that both browsers implement the Webkit rendering engine underneath?

Is this a cop out by developers or a valid assumption to make?

I am specifically asking about whether the pages of my website will render the same in both browsers and whether my Javascript will work in both browsers.

Yi Jiang
  • 49,435
  • 16
  • 136
  • 136
gary
  • 201
  • 1
  • 2
  • 1
    Nice question. I'm also interested if the same answer applies across Windows/Mac/Linux platforms. – Amy B Nov 15 '10 at 04:35
  • 2
    yes!, Software are complex and there are so many parts in a browser, testing is the only way you can be sure. – Anurag Uniyal Nov 15 '10 at 04:47

5 Answers5

14

There are some slight differences, so I would test in both. Some examples:

  • By default Safari has 3rd-party cookies disabled, but Chrome has them enabled by default.
  • Safari does not store <noscript> content in the DOM, Chrome does
  • Chrome keeps each browser window sandboxed in its own operating system process (multi-process model). Safari keeps all windows in one process. [Note though: The upcoming WebKit2 will have support for the multi-process model built in].
  • Chrome uses the V8 javascript engine, Safari uses Nitro.

I know there a few other differences I have encountered, but I can't remember them off the top of my head. I'll update this post if any occur to me.

Ben Lee
  • 52,489
  • 13
  • 125
  • 145
  • 3
    In practice, during development I will only switch between Chrome, Firefox, and IE 7 (god help me) in a VM, making sure everything works -- if you've got it in those, problems in other browsers are rare. I only go back and check other browsers (Safari, IE 6, IE 8, sometimes mobile) right before deploying to production. But I *do* check. – Ben Lee Nov 15 '10 at 13:04
  • 1
    I think they probably have plenty of other differences outside of the rendering/script engines proper: besides "simple" policy/parsing differences like you mention, does Safari use the same multi-process model? Do they implement all of the same JavaScript-accessible APIs (workers, databases, etc.)? – SamB Nov 17 '10 at 17:54
  • 1
    @SamB, Good point about Chrome's multi-process model. I added that to the answer. And regarding javascript, I think you are correct -- I'm sure I've encountered a few material differences in their javaScript engines in the past, but I honestly can't recall now what these differences are. – Ben Lee Nov 17 '10 at 18:04
  • Chrome uses a form of WebKit called Blink https://en.wikipedia.org/wiki/Blink_(web_engine) – Ahmed Mansour May 09 '17 at 15:15
9

They use different JavaScript engine, Chrome:V8, Safari:Nitro

wong2
  • 34,358
  • 48
  • 134
  • 179
5

Each browser may choose to include different features of webkit in their final versions, so they are not always the same.

WolfRevoKcats
  • 294
  • 1
  • 5
  • 1
    Not only that, but I believe Chrome's webkit often has patches that haven't made it upstream (yet). And who knows whether their "port" will change the rendering significantly -- besides the obvious case of any native GUI controls, I mean :-). – SamB Nov 17 '10 at 17:39
3

Even different versions of Chrome will behave differently, same for different versions of Safari. So I wouldn't use this assumption, and would test in both browsers.

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
  • Good luck testing the same thing in many versions of chrome, though ;-) – SamB Nov 17 '10 at 17:33
  • 1
    Oh, one example I've noticed: it seems like Chrome's behaviour for `history.back()` in the playlist `iframe` on http://rainwave.cc when there is just one previous location for that `iframe ` has gone back and forth between browsing the whole tab and just browsing that `iframe` at least a couple of times. (And the code on rainwave.cc was supposed to have been frozen for at least most of the period I saw this happening in.) – SamB Nov 17 '10 at 17:57
1

Interesting question, I was thinking about this earlier. I would say yes, just because the rendering engine is only one part of the browser. You also have to take into account that there are many versions of each browser still in use.

It doesn't take too long to test the page in ether, better safe then sorry.

Blake
  • 756
  • 3
  • 16
  • 34