# Chrome 59 headless support

**URL:** <https://meta.discourse.org/t/chrome-59-headless-support/62060>\
**Category:** Development\
**Created:** [3 Maggio 2017, 5:44pm UTC](https://meta.discourse.org/t/chrome-59-headless-support/62060 "2017-05-03T17:44:27Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [16 Agosto 2017, 9:03am UTC](https://meta.discourse.org/t/chrome-59-headless-support/62060/5 "2017-08-16T09:03:21Z")

</div>

I’ve had a play with getting the qunit tests running in headless chrome, and it seems to work alright. The performance improvement isn’t as dramatic as I’d hoped - on my computer phantomjs runs the core tests in 227s, and headless chrome runs them in 201s.

I’ve written a JS script, which depends on a couple of NPM modules: [chrome-launcher](https://www.npmjs.com/package/chrome-launcher) and [chrome-remote-interface](https://www.npmjs.com/package/chrome-remote-interface), which provide an interface to the Chrome Remote Debugging system @riking mentioned.

~~I’ve then given the `rake qunit:test` an optional third parameter to use chrome instead of phantomJS.~~ Set the USE\_CHROME environment variable to use chrome instead of phantomJS

So, assuming you have chrome and node/npm installed, using it works like this:

```plaintext
npm install chrome-launcher chrome-remote-interface
USE_CHROME=1 rake qunit:test

```

[https://github.com/discourse/discourse/pull/5054](https://github.com/discourse/discourse/pull/5054)

In summary, there’s not much advantage over PhantomJS at the moment, but that will change if [PhantomJS stops being developed](https://groups.google.com/forum/m/#!topic/phantomjs/9aI5d-LDuNE) in future.

---

_[View the full topic](https://meta.discourse.org/t/chrome-59-headless-support/62060)._
