开发者

How to Compress Everything in my ASP.NET Pages?

开发者 https://www.devze.com 2023-04-07 11:58 出处:网络
开发者_运维技巧I have a page with css, javascript, axd, resource files. My aim is to compress everything so that the response size is reduced and consequently the response time is improved for the en

开发者_运维技巧I have a page with css, javascript, axd, resource files.

My aim is to compress everything so that the response size is reduced and consequently the response time is improved for the end user.

Go to google.com, view source and you can see how google has compressed their contents nicely. that's what I want.

I can't rely on IIS to do any compression so they'd need to be done in the app.

Is there any HttpModule, code, tool to compress all the mentioned elements/files, remove white spaces, etc?

How can this be done?

Update: I'm already using JSBuilder for compressing javascripts into 1 file, also I'm using GZIP for Content-Encoding which has reduced the response size between 50-60%.


I can't rely on IIS to do any compression so they'd need to be done in the app.

IIS would be the ideal place to do it. Do not do it in the app. Happy medium: build script.

0

精彩评论

暂无评论...
验证码 换一张
取 消