首页 > 编程语言 >GZip/Deflate Compression in ASP.NET MVC

GZip/Deflate Compression in ASP.NET MVC

时间:2022-11-25 10:14:47浏览次数:59  
标签:ASP Compression Deflate content GZip NET compression

GZip/Deflate Compression in ASP.NET MVC

 

Compression Caveats

Http compression is very cool and pretty easy to implement in ASP.NET but you have to be careful with it - especially if your content might get transformed or redirected inside of ASP.NET. A good example, is if an error occurs and a compression filter is applied. ASP.NET errors don't clear the filter, but clear the Response headers which results in some nasty garbage because the compressed content now no longer matches the headers. Another issue is Caching, which has to account for all possible ways of compression and non-compression that the content is served. Basically compressed content and caching don't mix well. I wrote about several of these issues in an old blog post and I recommend you take a quick peek before diving into making every bit of output Gzip encoded.

None of these are show stoppers, but you have to be aware of the issues.

 

标签:ASP,Compression,Deflate,content,GZip,NET,compression
From: https://www.cnblogs.com/chucklu/p/16924271.html

相关文章

  • 《ASP.NET Core技术内幕与项目实战》精简集-DDD准备5.1:DDD基本概念
    一、DDD领域驱动设计1、DDD是一种设计思想,领域即业务,业务驱动设计,直接将业务映射到代码中。2、DDD的设计始于领域的划分,一个项目可以划分为多个子域,并可以按功能划分为核......
  • JavaSpark 读取 HBASE
    1、pom.xml<properties><maven.compiler.source>8</maven.compiler.source><maven.compiler.target>8</maven.compiler.target></properties>......
  • 小白常识asp.net sql 框架选择 以及高手交流pk实录
    EFCore官方文档:​​https://docs.microsoft.com/zh-cn/ef/​​​FreeSql官方文档:​​http://freesql.net/guide.html​​SqlSuger官方文档:​​http://www.codeisbug.com/......
  • asp.net core api 等调用webservice以及 处理返回值踩坑之路
    首先添加引用然他自动生成文件image.png点击goservices填写如​​http://192.168.1.5/Service1.asmx​​里面会加载出来记住名字如Service1Soap......
  • asp.net core api 基于token的JWT bearer 的鉴权验证实现探索
    .net的各种框架啥的都不是很熟悉,当时只是想怎么实现快速校验授权确保api是通过验证之后才能打开。我说的快速就是不需要写重复的样板代码,通过总体控制,最后发现,似乎也只能通......
  • @Aspect 注解使用详解
    AOP为AspectOrientedProgramming的缩写,意为:面向切面编程,通过预编译方式和运行期动态代理实现程序功能的统一维护的一种技术.AOP是​​OOP​​​的延续,是软件开发中的一个......
  • Aspose.Cells实现excel预览
    ​在WEB项目中经常遇到excel文档在线预览的需求,基本的解决思路有以下几大类:excel文档转PDF、excel文档直接转html、后台读取excel数据返回给前端利用Excel效果的表格插件......
  • ASP .NET Core 缓存
    缓存可以通过减少生成内容所需的工作,显著提高应用的性能和可伸缩性。缓存最适用于不常更改且生成成本很高的数据。缓存生成的数据副本可以比从源中更快地返回。应该以从......
  • Flink TaskManager OutOfMemoryError: Metaspace 处理记录
    一个很有意思的Flink任务异常处理记录一、环境信息Flink1.12Standalone模式,单台机器,由于客户环境基本很长时间会看不到运行状态二、问题现象现场同事反馈设备在客户......
  • 篇(20)-Asp.Net Core入门实战-完结之一期阶段总结
    入门实战-完结之一期阶段总结用了几天的功夫,编写和演练的这个Asp.NetCore简单入门的教程已经讲完,下一期可以将完善其功能,将UI功能也给其套上,至少可以达到商用的目的。简......