积极答复者
请问Azure中website如何使用gzip压缩(或者类似的技术)?

问题
答案
-
您好,
可以使用。
您需要在webconfig中对该功能进行配置,如下:
添加这段代码,表示您在应用程序级别对您的动态和静态内容进行压缩:
<system.webServer> <urlCompression doStaticCompression="true" doDynamicCompression="true" /> </system.webServer>
然后再指定您要压缩的动态或者金泰的MIME:
httpCompression> <dynamicTypes> <clear /> <add enabled="true" mimeType="text/*"/> <add enabled="true" mimeType="message/*"/> <add enabled="true" mimeType="application/x-javascript"/> <add enabled="true" mimeType="application/javascript"/> <add enabled="true" mimeType="application/json"/> <add enabled="false" mimeType="*/*"/> <add enabled="true" mimeType="application/atom+xml"/> <add enabled="true" mimeType="application/atom+xml;charset=utf-8"/> </dynamicTypes> <staticTypes> <clear /> <add enabled="true" mimeType="text/*"/> <add enabled="true" mimeType="message/*"/> <add enabled="true" mimeType="application/javascript"/> <add enabled="true" mimeType="application/atom+xml"/> <add enabled="true" mimeType="application/xaml+xml"/> <add enabled="true" mimeType="application/json"/> <add enabled="false" mimeType="*/*"/> </staticTypes> </httpCompression>
建议您参考这几个post:
和
希望能够帮助到您。
Regards,
Will
如果您想进一步了解Windows Azure, Windows Azure 官网欢迎您的访问
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- 已建议为答案 ThankfulHeart 2015年2月22日 9:28
- 已标记为答案 天际游云 2015年2月22日 10:51
- 已编辑 Will ShaoMicrosoft employee, Moderator 2015年3月6日 8:54
全部回复
-
您好,
可以使用。
您需要在webconfig中对该功能进行配置,如下:
添加这段代码,表示您在应用程序级别对您的动态和静态内容进行压缩:
<system.webServer> <urlCompression doStaticCompression="true" doDynamicCompression="true" /> </system.webServer>
然后再指定您要压缩的动态或者金泰的MIME:
httpCompression> <dynamicTypes> <clear /> <add enabled="true" mimeType="text/*"/> <add enabled="true" mimeType="message/*"/> <add enabled="true" mimeType="application/x-javascript"/> <add enabled="true" mimeType="application/javascript"/> <add enabled="true" mimeType="application/json"/> <add enabled="false" mimeType="*/*"/> <add enabled="true" mimeType="application/atom+xml"/> <add enabled="true" mimeType="application/atom+xml;charset=utf-8"/> </dynamicTypes> <staticTypes> <clear /> <add enabled="true" mimeType="text/*"/> <add enabled="true" mimeType="message/*"/> <add enabled="true" mimeType="application/javascript"/> <add enabled="true" mimeType="application/atom+xml"/> <add enabled="true" mimeType="application/xaml+xml"/> <add enabled="true" mimeType="application/json"/> <add enabled="false" mimeType="*/*"/> </staticTypes> </httpCompression>
建议您参考这几个post:
和
希望能够帮助到您。
Regards,
Will
如果您想进一步了解Windows Azure, Windows Azure 官网欢迎您的访问
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- 已建议为答案 ThankfulHeart 2015年2月22日 9:28
- 已标记为答案 天际游云 2015年2月22日 10:51
- 已编辑 Will ShaoMicrosoft employee, Moderator 2015年3月6日 8:54