Anyuka helyén marad!

Utolsó kommentek

  • Pénztörténet: www.youtube.com/watch?v=Fpk35NO5WtE&feature=share&list=UU86sMRBpLe1Xteg1GVXg12A&index=3 (2013.12.23. 13:15) Árulás és koncepciós per az ezerforintoson
  • sztahanov: tudni kell mikor feladni, en pl most harom ora keresgeles utan feladtam. (2010.08.25. 22:58) Blob
  • sztahanov: ez mar jobb, de most dolgozom epp :-) (2010.08.25. 12:45) Blob
  • Utolsó 20

Friss topikok

  • Pénztörténet: www.youtube.com/watch?v=Fpk35NO5WtE&feature=share&list=UU86sMRBpLe1Xteg1GVXg12A&index=3 (2013.12.23. 13:15) Árulás és koncepciós per az ezerforintoson
  • sztahanov: tudni kell mikor feladni, en pl most harom ora keresgeles utan feladtam. (2010.08.25. 22:58) Blob
  • Gm: :))) (2010.03.21. 19:33) Szakácskések I. – A séfkés
  • gasztromán: Nagy örmmel olvastam a boltról a cikket! Én is felfedeztem, kb. fél évvel ezelőtt. Tényleg unikum ... (2009.07.29. 23:47) azbeszt - Marha jó!
  • burqus: Köszi a poszt beidézését és a jó hír terjesztését. Viszont a képeken egérmozgatásra felpattanó abl... (2008.09.28. 18:03) A legjobb kínai vendéglő

Twitter

Nincs megjeleníthető elem

Címkék

api (1) biz (4) blogok (3) bookmarks (1) dizájn (4) facebook (13) feedek (19) friendfeed (1) gmail (3) google (19) iphone (4) kommentek (8) labels (1) myspace (3) nokia mosh (1) openid (2) orkut (1) sn (54) start (3) twitter (3) ui (8) videó (2) widgets (1) yahoo mash (1) Címkefelhő

Scobleizer

Nincs megjeleníthető elem

izotov

Google Reader shared items

filter
admin

Külső feed

Nincs megjeleníthető elem

Google Reader Starred

Doransky

Nincs megjeleníthető elem

Using Dust-Me Selectors Plugin to find unused CSS selectors

2008.04.10. 10:10 klauskomenda.com eszpee

Every Web Developer knows about them and everyone amongst them who cares about performance fears them. Unused zombie-like CSS selectors that were initially added to your CSS files (probably at an early stage of the project) with good intentions but became useless and redundant at some point, most likely because of changes in the markup. So these CSS selectors normally stay there, unless some intern gets hired to find them - cause a regular Web Developer has far more important things to do, right?

With the Dust-Me Selectors Firefox extension provided by SitePoint, there is a way out of this. The extension provides a convenient way of cleaning up your CSS file(s) and identifying selectors which are not used anymore.

Dust-Me Selectors Icon in Browser BarAfter installation, the presence of the application is indicated by an icon in the browser bar showing a spiffy broom. The extension comes with several options. First, you can select that upon visiting a certain web site, it starts recording which CSS selectors from the CSS files loaded get actually used on the site you are on (indicated by an animated broom icon and listing the amount of unused selectors found in how many CSS files). It then creates a list and bit by bit ticking off every selector being used. While you continue browsing the site, that list (hopefully) gets smaller and after you have browsed through samples of significant pages on your site, it will give you a list of CSS selectors which - it thinks - are redundant and can be deleted.

Dust-Me Selectors Spider Sitemap Window ScreenshotWith version 2.0, the clever guys at SitePoint (cause they know what we want) built a spider functionality into Dust-Me. This means that you can provide the extension with a sitemap of your site (either an HTML file with a list of links or a Sitemap XML file) and it will spider the pages provided (and going one level deep from there). From my perspective a more convenient way, if you have a tool that creates a site map like XML-Sitemaps.com Sitemap Generator or GSiteCrawler. There is even a Google (XML) Sitemaps Generator for WordPress.

Dust-Me Selectors View Data ScreenshotThe “view saved data” option in the plugin will then give you a nice list of used/unused selectors which will give you a sense of which selectors might be save to delete. I say might, because it does not check whether you might use one or the other CSS selector to style markup you insert via JavaScript into the page. This is beyond the scope of the plugin, so with the final output data from Dust-Me at hand, you will need to check whether one or the other applies to markup added using JavaScript — and then don’t delete them, of course :-)

Further reading

A bejegyzés trackback címe:

https://izotov.blog.hu/api/trackback/id/tr88419453

Kommentek:

A hozzászólások a vonatkozó jogszabályok  értelmében felhasználói tartalomnak minősülnek, értük a szolgáltatás technikai  üzemeltetője semmilyen felelősséget nem vállal, azokat nem ellenőrzi. Kifogás esetén forduljon a blog szerkesztőjéhez. Részletek a  Felhasználási feltételekben és az adatvédelmi tájékoztatóban.

Nincsenek hozzászólások.
süti beállítások módosítása