| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 24 Dec 2025 02:00:44 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090803033501
location: https://web.archive.org/web/20090803033501/https://github.com/aanand/deadweight/tree/master
server-timing: captures_list;dur=0.915853, exclusion.robots;dur=0.062904, exclusion.robots.policy;dur=0.049380, esindex;dur=0.013837, cdx.remote;dur=15.339642, LoadShardBlock;dur=269.255843, PetaboxLoader3.datanode;dur=132.559627, PetaboxLoader3.resolve;dur=21.591881
x-app-server: wwwb-app219-dc8
x-ts: 302
x-tr: 334
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app219; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Wed, 24 Dec 2025 02:00:46 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Mon, 03 Aug 2009 03:35:07 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 5215ms
x-archive-orig-etag: "c81cc0445ffef67e9404f6b46d188c28"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 25630
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Mon, 03 Aug 2009 03:35:01 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: ARCHIVEIT-1035-20090803-00000/ARCHIVEIT-1035-20090803033435-00576-crawling04.us.archive.org.warc.gz
server-timing: captures_list;dur=0.510786, exclusion.robots;dur=0.016885, exclusion.robots.policy;dur=0.007603, esindex;dur=0.009893, cdx.remote;dur=10.499515, LoadShardBlock;dur=1299.938624, PetaboxLoader3.datanode;dur=238.789943, PetaboxLoader3.resolve;dur=1288.441888, load_resource;dur=235.063224
x-app-server: wwwb-app219-dc8
x-ts: 200
x-tr: 1596
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
aanand's deadweight at master - GitHub
Hi There! aanand is using GitHub to share code with you!
GitHub is more than just a place to share code. It's a place to keep tabs on your favorite projects, easily contribute fixes and new features, and visualize what's going on inside your codebase!
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Run the following if you haven't already:
gem sources -a https://gems.github.com
Install the gem(s):
sudo gem install aanand-deadweight
| Description: | CSS coverage tool edit |
| Homepage: | edit |
| Public Clone URL: |
git://github.com/aanand/deadweight.git
Give this clone URL to anyone.
git clone git://github.com/aanand/deadweight.git
|
| Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:aanand/deadweight.git
|
| name | age | message | |
|---|---|---|---|
| |
.document | Loading commit data... |
|
| |
.gitignore | ||
| |
LICENSE | ||
| |
README.rdoc | Thu Jul 23 07:07:57 -0700 2009 | README: s/description/desc/g [aanand] |
| |
Rakefile | Tue Jul 21 11:37:50 -0700 2009 | Added description and dependencies [aanand] |
| |
VERSION | ||
| |
deadweight.gemspec | ||
| |
lib/ | ||
| |
test/ | Tue Jul 21 11:27:26 -0700 2009 | ~here it is~ [aanand] |
README.rdoc
deadweight
Deadweight is RCov for CSS, kind of. Given a set of stylesheets and a set of URLs, it determines which selectors are actually used and reports which can be "safely" deleted.
A Simple Example
# lib/tasks/deadweight.rake
require 'deadweight'
desc "run Deadweight (script/server needs to be running)"
task :deadweight do
dw = Deadweight.new
dw.stylesheets = %w( /stylesheets/style.css )
dw.pages = %w( / /page/1 /about )
puts dw.run
end
This will output all unused selectors, one per line.
How You Install It
gem sources -a https://gems.github.com sudo gem install aanand-deadweight
Things to Note
- By default, it looks at localhost:3000.
- It’s completely dumb about any classes, IDs or tags that are only added by your Javascript layer, but you can filter them out by setting ignore_selectors.
- You can optionally tell it to use Mechanize, and set up more complicated targets for scraping by specifying them as Procs.
A More Complex Example, In Light of All That
# lib/tasks/deadweight.rake
require 'deadweight'
desc "run Deadweight on staging server"
task :deadweight do
dw = Deadweight.new
dw.mechanize = true
dw.root = 'https://staging.example.com'
dw.stylesheets = %w( /stylesheets/style.css )
dw.pages = %w( / /page/1 /about )
dw.pages << proc {
fetch('/login')
form = agent.page.forms.first
form.username = 'username'
form.password = 'password'
agent.submit(form)
fetch('/secret-page')
}
dw.ignore_selectors = /hover|lightbox|superimposed_kittens/
puts dw.run
end
Copyright
Copyright © 2009 Aanand Prasad. See LICENSE for details.
This feature is coming soon. Sit tight!













