Reply to Re: cleaning up classes and ids in large site

Your name:

Reply:


Posted by shimmyshack on 02/16/07 04:36

On 16 Feb, 03:12, mbstevens <NOXwebmast...@xmbstevensx.com> wrote:
> On Thu, 15 Feb 2007 19:02:00 -0800, windandwaves wrote:
> > a. find all the IDs and classes used on the site.
> > b. check if these classes and IDs are listed in the css
> > c. find any classes and IDs listed in the css that are no longer used
> > on the site
>
> I know of nothing ready-made, but it should be reasonably easy to
> program in either Perl or Python.

if i were you I would write a small reg exp that goes and grabs
classes from the css files, put them inside a javascript object/array
and download the behaviour.js library and include the object and class
in a script on each page.
Using XHR to send back the element id's of the css styles array which
you save crossing them off your list, (and out of the styles js array/
object)
This way your clients do the work in their browsers, reaching every
nook and cranny of your monster site in a "period of time" at the end
of which the remaining styles can be safely deleted from the
stylesheet.
As well as this you provide an easy togglable way to repeat the
process later, for any site.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация