PM> Install-Package Owin.Compression26 |
84 |
85 | Even though the browser sees everything as plain text, the traffic is actually transferred in compressed format.
86 | You can monitor the traffic with e.g. Fiddler.
87 |
88 | Example #2
89 | ----------
90 |
91 | Running on OWIN Self-Host (Microsoft.Owin.Hosting) with static files server (Microsoft.Owin.StaticFiles)
92 | and compressing only the ".json"-responses (and files) on-the-fly, with only gzip and not deflate:
93 |
94 | ```csharp
95 | using System;
96 | using Owin;
97 | [assembly: Microsoft.Owin.OwinStartup(typeof(MyServer.MyWebStartup))]
98 | namespace MyServer
99 | {
100 | class MyWebStartup
101 | {
102 | public void Configuration(Owin.IAppBuilder app)
103 | {
104 | var settings = new CompressionSettings(
105 | serverPath: "",
106 | allowUnknonwnFiletypes: false,
107 | allowRootDirectories: false,
108 | cacheExpireTime: Microsoft.FSharp.Core.FSharpOption