admin管理员组文章数量:1390240
How can you press inline script and style tags?
YSlow says In addition to minifying external scripts and styles, inlined script and style blocks can and should also be minified.
How can you press inline script and style tags?
YSlow says In addition to minifying external scripts and styles, inlined script and style blocks can and should also be minified.
Share Improve this question edited May 22, 2009 at 15:32 Ferdinand Beyer 67.3k17 gold badges159 silver badges147 bronze badges asked May 22, 2009 at 15:23 kaseykasey 5537 silver badges21 bronze badges3 Answers
Reset to default 5Don't forget that there's a .NET port of YUI Compressor. :)
You can use it for post-build events or in a TFS build or just use the dll's in your own project(s).
You might look into MBCompression It allows you to press pretty much everything ing out of a app (including those lovely webresource.axd files).
This has a similiar effect as regular javascript pression. Beyond that, i'd still look into pulling out the inline scripts into separate files in order to remove duplication and allow the browser to cache that data.
It is just text. Remove it from the HTML surrounding it, run it through the YUI pressor, then put it back.
If it is generated by ASP.NET ponents - then you'd probably have to intercept it on the way out of ASP (e.g. with a proxy), and at that point is almost certainly isn't worth the effort.
本文标签: javascriptCan YUI compressor minify ASPNET inline scriptStack Overflow
版权声明:本文标题:javascript - Can YUI compressor minify ASP.NET inline script? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744634320a2616732.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论