Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(headless-chrome): switch to prioritize headless #4553

Merged
merged 2 commits into from
Feb 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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