Skip to content

Commit

Permalink
docs(headless-chrome): switch to prioritize headless (#4553)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel authored and patrickhulce committed Feb 21, 2018
1 parent 429fff7 commit 7226fcd
Showing 1 changed file with 23 additions and 28 deletions.
51 changes: 23 additions & 28 deletions docs/headless-chrome.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
# Running Lighthouse using headless Chrome

For now, we recommend running Chrome with xvfb. See below.
## CLI (headless)

Setup:

```sh
# get node 6
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

# get chromium (stable)
apt-get install chromium-browser

# install lighthouse
npm i -g lighthouse
```

Kick off run of Lighthouse using headless Chrome:

```sh
lighthouse --chrome-flags="--headless" https://github.com
```

## CLI (xvfb)

Chrome + xvfb is the stable solution we recommend. These steps worked on Debian Jessie:
Alternatively, you can run full Chrome + xvfb instead of headless mode. These steps worked on Debian Jessie:

```sh
# get node 6
Expand Down Expand Up @@ -35,32 +55,7 @@ xvfb-run --server-args='-screen 0, 1024x768x16' \
lighthouse --port=9222 https://github.com
```

## CLI (headless)

> **Note**: Headless Chrome still has a few bugs to work out. For example, [network emulation](https://bugs.chromium.org/p/chromium/issues/detail?id=728451) is not supported yet.
This can affect the accuracy of performance scores returned by Lighthouse.

Setup:

```sh
# get node 6
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

# get chromium (stable)
apt-get install chromium-browser

# install lighthouse
npm i -g lighthouse
```

Kick off run of Lighthouse using headless Chrome:

```sh
lighthouse --chrome-flags="--headless" https://github.com
```

## Node
## Node module

Install:

Expand Down

0 comments on commit 7226fcd

Please sign in to comment.