Skip to content
This repository

Scriptable Headless WebKit

This branch is 28 commits ahead and 593 commits behind master

Make sure POST works.

With Qt 4.8, POST request with an empty content type will make the
content type set to "application/octet-stream". Somehow this breaks

The fix is to set the content type to "application/x-www-form-urlencoded",
like the case with Qt 4.7.

Based on the suggestion by Leo Franchi.
latest commit 5322ee9681
Ariya Hidayat authored January 07, 2012
Octocat-spinner-32 bin Mac OS X: Prevent showing the icon on the dock. December 19, 2011
Octocat-spinner-32 debian The python package is arch: all July 03, 2011
Octocat-spinner-32 deploy Make linux build script use the Qt 4.8.0 tarball. December 30, 2011
Octocat-spinner-32 examples Remove the complex example for WebServer module. December 20, 2011
Octocat-spinner-32 python Prepara 1.4 branch for 1.4.1 bug fix release. December 30, 2011
Octocat-spinner-32 src Make sure POST works. January 10, 2012
Octocat-spinner-32 test Adjust the test for version 1.4.1. December 31, 2011
Octocat-spinner-32 .gitignore Ignore source files in the deploy/ directory December 30, 2011
Octocat-spinner-32 ChangeLog Changes for 1.4.1. December 30, 2011
Octocat-spinner-32 LICENSE.BSD Long live PhantomJS! December 26, 2010
Octocat-spinner-32 Refer to 1.4 in the README. December 20, 2011
Octocat-spinner-32 Import the old, working prototype. December 26, 2010

PhantomJS ( is a headless WebKit with JavaScript API.

It has fast and native support for DOM handling, CSS selector, JSON, Canvas, and SVG.

PhantomJS is cross-platform, it can be compiled for Linux, Windows, FreeBSD, and Mac OS X. Refer to the build instructions for details.

Note: If you are on Mac OS X, read the notice before you start using brew or port to install Qt and/or PhantomJS.

PhantomJS scripts can be written in JavaScript or CoffeeScript.

See also quick start guide and more advanced examples which show various PhantomJS scripts, covering:

  • getting driving direction
  • showing weather forecast conditions
  • finding pizza in New York
  • looking up approximate location based on IP address
  • pulling the list of seasonal food
  • running regression tests from command line
  • producing PDF version of a Wikipedia article
  • rasterizing SVG to image

Do not forget to consult the concise API Reference.

PhantomJS is based on Qt. There are two implementations, using C++ and Python.

The latest stable release is version 1.4 ("Glory of the Snow").

If you want to contribute, please read the Contribution Guide.

Something went wrong with that request. Please try again.