| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 24 Dec 2025 01:34:43 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090821233401
location: https://web.archive.org/web/20090821233401/https://github.com/aanand/deadweight/tree/master
server-timing: captures_list;dur=0.851958, exclusion.robots;dur=0.071697, exclusion.robots.policy;dur=0.057775, esindex;dur=0.012119, cdx.remote;dur=14.046010, LoadShardBlock;dur=224.115969, PetaboxLoader3.datanode;dur=75.905043, PetaboxLoader3.resolve;dur=12.709534
x-app-server: wwwb-app225-dc8
x-ts: 302
x-tr: 281
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app225; 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 01:34:44 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Fri, 21 Aug 2009 23:34:00 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 389ms
x-archive-orig-etag: "08eb6b5207e318b9ea9c97f1ab543584"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 26584
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Fri, 21 Aug 2009 23:34: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: 51_11_20090821200350_crawl100.gpg-c/51_11_20090821233401_crawl101.arc.gz
server-timing: captures_list;dur=0.428654, exclusion.robots;dur=0.013218, exclusion.robots.policy;dur=0.006523, esindex;dur=0.008307, cdx.remote;dur=6.201813, LoadShardBlock;dur=187.084322, PetaboxLoader3.datanode;dur=121.232957, PetaboxLoader3.resolve;dur=120.813799, load_resource;dur=138.408467
x-app-server: wwwb-app225-dc8
x-ts: 200
x-tr: 389
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
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 | Tue Jul 21 11:21:30 -0700 2009 | Initial commit to deadweight. [aanand] |
| |
.gitignore | Tue Jul 21 11:27:26 -0700 2009 | ~here it is~ [aanand] |
| |
LICENSE | Tue Jul 21 11:21:30 -0700 2009 | Initial commit to deadweight. [aanand] |
| |
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 | Tue Aug 18 07:38:39 -0700 2009 | Version bump to 0.0.3 [aanand] |
| |
deadweight.gemspec | Tue Aug 18 07:40:21 -0700 2009 | Regenerated gemspec for version 0.0.3 [aanand] |
| |
lib/ | Tue Aug 18 04:25:40 -0700 2009 | Ignore pseudo classes Looking for elements wit... [avdgaag] |
| |
test/ | Tue Aug 18 04:25:40 -0700 2009 | Ignore pseudo classes Looking for elements wit... [avdgaag] |
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!











