A web service that gets the total size of an webpage (scripts, images, css, etc) using phantomjs.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
grunt.js
package.json
readme.md
server.js

readme.md

node-pagesize

A node.js web service that determines the total render size of a remote http page (i.e. all of its images, css, scripts). node-pagesize uses an instance of phantomjs to determine the page size.

Usage

POST a request to the page endpoint.

 sh $ curl -dpage=http://www.google.com http://localhost:3000/page

JSON Response: {"bytes": <some integer>}

Install

 sh $ git clone git@github.com:smithclay/node-pagesize.git
 sh $ cd node-pagesize
 sh $ npm install
 sh $ node server.js

License

MIT