查找未使用的图像、css 规则、js 脚本块 [英] find unused images, css rules, js script blocks

查看:23
本文介绍了查找未使用的图像、css 规则、js 脚本块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个相当大的 asp.net 网站.

图像、css 和 javascripts 是网站项目中组织的属性,但随着我们正在改变网站的外观和感觉,我想知道是否有工具/插件可以帮助我识别哪些图像未在网站中使用.

我也想用 css 和 javascript 找到同样的东西.我看过dustme firefox扩展,但只有css.

解决方案

未使用的 CSS

  1. http://www.sitepoint.com 查看 Firefox 扩展 Dust-Me/dustmeselectors/.

  2. Google Chrome 在其开发者控制台中有一个网站审核工具.p>

  3. 我还发现这个站点用于删除未使用的 css - http://unused-css.com/.键入站点的 url,您将获得 CSS 选择器列表.对于每个选择器,一个数字表示一个选择器被使用了多少次.此服务有一些限制.不支持 @import 语句.您无法配置和下载新的干净 CSS 文件.

  4. Helium CSS 是一个 javascript 工具,用于发现跨多个页面的未使用 CSS网站.您首先必须将 javascript 文件安装到要测试的页面.然后,你必须调用一个氦函数来开始清洗.

  5. CSSESS 是一个小书签,可帮助您在任何站点上找到未使用的 CSS 选择器.这个工具很容易使用,但它不会让你配置和下载干净的 CSS 文件.它只会列出未使用的 CSS 文件.

  6. 如何在网站中找到未使用的图像和 CSS 样式?

未使用的图片:

  1. http://obsidience.blogspot.在/2008/06/using-powershell-to-find-unused-images.html
  2. 如何我是否要编写 Bash 脚本来查找项目中未使用的图像?

未使用的 JS:

  1. 查找未使用的 CSSWeb 项目中的规则和 js 脚本?
  2. 查找未使用的 Javascript 函数?

We have a fairly large asp.net website.

The images, css and javascripts are property organized in the website project but as we are changing the look and feel of the website, I would like to know if there is a tool/add-in that will help me identify which images are not being used in the website.

I would like to find the same thing with css and javascript as well. I have looked at dustme firefox extension but that only does css.

解决方案

Unused CSS

  1. Take a look at the Firefox extension Dust-Me at http://www.sitepoint.com/dustmeselectors/.

  2. Google Chrome has a website auditing tool in their developer console.

  3. Also I found this site for removing unused css - http://unused-css.com/ . Type the url of a site and you will get a list of CSS selectors. For each selector, a number indicates how many times a selector is used. This service has a few limitations. The @import statement is not supported. You can't configure and download the new clean CSS file.

  4. Helium CSS is a javascript tool for discovering unused CSS across many pages on a web site. You first have to install the javascript file to the page you want to test. Then, you have to call a helium function to start the cleaning.

  5. CSSESS is a bookmarklet that helps you find unused CSS selectors on any site. This tool is pretty easy to use but it won't let you configure and download clean CSS files. It will only list unused CSS files.

  6. How can I find unused images and CSS styles in a website?

Unused Images:

  1. http://obsidience.blogspot.in/2008/06/using-powershell-to-find-unused-images.html
  2. How Do I Make a Bash Script To Find Unused Images in a Project?

Unused JS:

  1. Find unused CSS rule and js script in a web project?
  2. Find unused Javascript functions?

这篇关于查找未使用的图像、css 规则、js 脚本块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆