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

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

问题描述

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



图片,CSS和javascript是在网站项目中组织的属性,但是当我们改变网站的外观和感觉时,我想知道是否有工具/加载项,将帮助我确定哪些图像没有在网站中使用。



我想在css和javascript中找到同样的东西。我已经看过dustme firefox扩展,但只有css。

解决方案

未使用的CSS




  1. 查看Firefox扩展程序Dust-Me,网址为: http:// www .sitepoint.com / dustmeselectors /


  2. Google Chrome有 / devtools />网站审核工具


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


  4. CSS是一个javascript工具,用于在网站上的许多页面上发现未使用的CSS。您首先必须将javascript文件安装到要测试的页面。然后,您必须调用氦功能才能开始清洁。


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


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




未使用的图片:




  1. http://obsidience.blogspot.in/2008/06/using-powershell-to-find-unused-images.html li>
  2. 如何制作Bash脚本以在项目中查找未使用的图片?



未使用的JS:




  1. 在网络项目中查找未使用的CSS规则和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天全站免登陆