<s>
A	O
headless	B-Protocol
browser	I-Protocol
is	O
a	O
web	B-Application
browser	I-Application
without	O
a	O
graphical	B-Application
user	I-Application
interface	I-Application
.	O
</s>
<s>
Headless	B-Protocol
browsers	I-Protocol
provide	O
automated	O
control	O
of	O
a	O
web	O
page	O
in	O
an	O
environment	O
similar	O
to	O
popular	O
web	B-Application
browsers	I-Application
,	O
but	O
they	O
are	O
executed	O
via	O
a	O
command-line	B-Application
interface	I-Application
or	O
using	O
network	O
communication	O
.	O
</s>
<s>
They	O
are	O
particularly	O
useful	O
for	O
testing	B-Application
web	O
pages	O
as	O
they	O
are	O
able	O
to	O
render	O
and	O
understand	O
HTML	O
the	O
same	O
way	O
a	O
browser	B-Application
would	O
,	O
including	O
styling	O
elements	O
such	O
as	O
page	O
layout	O
,	O
colour	O
,	O
font	O
selection	O
and	O
execution	O
of	O
JavaScript	B-Language
and	O
Ajax	B-General_Concept
which	O
are	O
usually	O
not	O
available	O
when	O
using	O
other	O
testing	B-Application
methods	O
.	O
</s>
<s>
Since	O
version	O
59	O
of	O
Google	B-Application
Chrome	I-Application
and	O
version	O
56	O
of	O
Firefox	B-Application
,	O
there	O
is	O
native	O
support	O
for	O
remote	O
control	O
of	O
the	O
browser	B-Application
.	O
</s>
<s>
This	O
made	O
earlier	O
efforts	O
obsolete	O
,	O
notably	O
PhantomJS	B-Protocol
.	O
</s>
<s>
The	O
main	O
use	O
cases	O
for	O
headless	B-Protocol
browsers	I-Protocol
are	O
:	O
</s>
<s>
Running	O
automated	B-Application
tests	I-Application
for	O
JavaScript	B-Language
libraries	O
.	O
</s>
<s>
Headless	B-Protocol
browsers	I-Protocol
are	O
also	O
useful	O
for	O
web	B-Application
scraping	I-Application
.	O
</s>
<s>
Google	B-Application
stated	O
in	O
2009	O
that	O
using	O
a	O
headless	B-Protocol
browser	I-Protocol
could	O
help	O
their	O
search	O
engine	O
index	O
content	O
from	O
websites	O
that	O
use	O
Ajax	B-General_Concept
.	O
</s>
<s>
Headless	B-Protocol
browsers	I-Protocol
have	O
also	O
been	O
misused	O
in	O
various	O
ways	O
:	O
</s>
<s>
However	O
,	O
a	O
study	O
of	O
browser	B-Application
traffic	O
in	O
2018	O
found	O
no	O
preference	O
by	O
malicious	O
actors	O
for	O
headless	B-Protocol
browsers	I-Protocol
.	O
</s>
<s>
As	O
several	O
major	O
browsers	B-Application
natively	O
support	O
headless	O
mode	O
through	O
APIs	B-General_Concept
,	O
some	O
software	O
exists	O
to	O
perform	O
browser	B-Protocol
automation	I-Protocol
through	O
a	O
unified	O
interface	O
.	O
</s>
<s>
Some	O
test	B-Application
automation	I-Application
software	I-Application
and	O
frameworks	O
include	O
headless	B-Protocol
browsers	I-Protocol
as	O
part	O
of	O
their	O
testing	B-Application
apparati	O
.	O
</s>
<s>
Capybara	B-Library
uses	O
headless	B-Protocol
browsing	I-Protocol
,	O
either	O
via	O
WebKit	B-Language
or	O
Headless	O
Chrome	B-Application
to	O
mimic	O
user	O
behavior	O
in	O
its	O
testing	B-Application
protocols	O
.	O
</s>
<s>
Jasmine	B-Language
uses	O
Selenium	O
by	O
default	O
,	O
but	O
can	O
use	O
WebKit	B-Language
or	O
Headless	O
Chrome	B-Application
,	O
to	O
run	O
browser	B-Application
tests	O
.	O
</s>
<s>
Another	O
approach	O
is	O
to	O
use	O
software	O
that	O
provides	O
browser	B-Application
APIs	B-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
Deno	B-Application
provides	O
browser	B-Application
APIs	B-General_Concept
as	O
part	O
of	O
its	O
design	O
.	O
</s>
<s>
For	O
Node.js	B-Language
,	O
jsdom	O
is	O
the	O
most	O
complete	O
provider	O
.	O
</s>
<s>
While	O
most	O
are	O
able	O
to	O
support	O
common	O
browser	B-Application
features	O
(	O
HTML	O
parsing	O
,	O
cookies	B-Application
,	O
XHR	B-Protocol
,	O
some	O
JavaScript	B-Language
,	O
etc	O
.	O
</s>
<s>
)	O
,	O
they	O
do	O
not	O
render	O
the	B-General_Concept
DOM	I-General_Concept
and	O
have	O
limited	O
support	O
for	O
DOM	B-Application
events	I-Application
.	O
</s>
<s>
They	O
usually	O
perform	O
faster	O
than	O
full	O
browsers	B-Application
,	O
but	O
are	O
unable	O
to	O
correctly	O
interpret	O
many	O
popular	O
websites	O
.	O
</s>
<s>
Another	O
is	O
HtmlUnit	B-Language
,	O
a	O
headless	B-Protocol
browser	I-Protocol
written	O
in	O
Java	O
.	O
</s>
<s>
HtmlUnit	B-Language
uses	O
the	O
Rhino	B-Language
engine	I-Language
to	O
provide	O
JavaScript	B-Language
and	O
Ajax	B-General_Concept
support	O
as	O
well	O
as	O
partial	O
rendering	O
capability	O
.	O
</s>
<s>
These	O
are	O
various	O
software	O
that	O
provide	O
headless	B-Protocol
browser	I-Protocol
APIs	B-General_Concept
.	O
</s>
<s>
Splash	O
is	O
a	O
headless	B-Protocol
web	I-Protocol
browser	I-Protocol
written	O
in	O
Python	O
using	O
the	O
WebKit	B-Language
layout	O
engine	O
via	O
Qt	B-Language
.	O
</s>
<s>
It	O
has	O
an	O
HTTP	O
API	B-General_Concept
,	O
Lua	O
scripting	O
support	O
and	O
a	O
built-in	O
IPython	B-Application
(	O
Jupyter	O
)	O
-based	O
IDE	O
.	O
</s>
<s>
Zombie.js	O
is	O
a	O
simulated	O
browser	B-Application
environment	O
for	O
Node.js	B-Language
.	O
</s>
<s>
DotNetBrowser	B-Application
is	O
a	O
proprietary	O
.NET	O
Chromium-based	O
library	O
that	O
provides	O
the	O
off-screen	O
rendering	O
mode	O
and	O
can	O
be	O
used	O
without	O
embedding	O
or	O
displaying	O
windows	O
.	O
</s>
<s>
Another	O
noted	O
earlier	O
effort	O
was	O
envjs	O
in	O
2008	O
from	O
John	O
Resig	O
,	O
which	O
was	O
a	O
simulated	O
browser	B-Application
environment	O
written	O
in	O
JavaScript	B-Language
for	O
the	O
Rhino	B-Language
engine	I-Language
.	O
</s>
