如何压缩 ASPX 页面?

发布于 2024-12-06 16:20:34 字数 452 浏览 4 评论 0原文

我按照这里的示例来压缩我的页面:

http://www.codeproject.com/ KB/aspnet/Aspx_Compression.aspx

但我得到的结果是一个充满奇怪字符的页面:

���I�%&/m�{J�J��t��$�@��������iG#)�*��eVe]f@�흼 {����{����;�N'

不确定该代码有什么问题?

我在 Page_Load 和 Page_Render 事件中尝试了代码。

有什么想法吗?

谢谢,

更新: 只是更新;我的代码错了!使用 FireBug/Net 选项卡对其进行调试,发现添加了错误的标头。

I followed the sample from here to compress my page:

http://www.codeproject.com/KB/aspnet/Aspx_Compression.aspx

But the result I get is a page full of odd characters:

���I�%&/m�{J�J��t��$ؐ@�������iG#)�*��eVe]f@�흼��{����{����;�N'

Not sure what's wrong with that code?

I tried the code both in Page_Load and Page_Render events.

Any idea?

Thanks,

Update:
just an update; my code was wrong! debugged it with FireBug/Net tab and it was revealed that a wrong Header was added.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时常饿 2024-12-13 16:20:34

使用 SquishIt 压缩 CSS 和 JavaScript。这是一个非常好的工具,

请参阅 SquishIt 上的一篇很好的 文章

您可以从 GitHub 下载 SquishIt

Use SquishIt to compress the CSS and JavaScript. It is a very good tool

See a good article on SquishIt

You can dowload the SquishIt from GitHub

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文