How do I figure out which pages on a web site are wider than X amount of pixels?
March 18, 2008 2:26 PM
Subscribe
How can I analyze the width of specific site's web pages? I'm envisioning either a list of links for pages exceeding a certain amount of pixels or a table that lists every page title, along with the link and the page's width.
posted by boombot to computers & internet (7 comments total)
1 user marked this as a favorite
Different websites will use different techniques to govern width. Some will use table-based layout; these may define the width for the table as a whole, or for the columns.
Some will use CSS—these may use floats to stack several columns next to each other, or absolute positioning, or a combination of the two, with widths to govern the columns, or a wrapper around them, or the body.
Some won't have a fixed width—Metafilter will expand to fill your screen (AFACT). Some may enumerate the width in terms of ems, in which case the width depends on your font size. Some may have a max-width and a min-width, but no hard fixed width.
So going at it on a code level will require you to analyze each page and do a lot of math.
The alternative (and probably more realistic) would be to render each page, take a screen shot of it, and use some super-smart technique for figuring out the "live" part of the page. Of course, you'll get some discrepancies depending on what rendering you use, but that's another matter.
Neither approach has an out-of-the-box solution for you that you can just fire and forget, AFAIK.
posted by adamrice at 2:44 PM on March 18, 2008