Skip to content

Commit 29edba7

Browse files
committed
Update docs
1 parent 2fef899 commit 29edba7

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Owin.Compression
33

44
Compression (Deflate / GZip) module for Microsoft OWIN Selfhost filesystem pipeline.
5-
Can be used also with AspNetCore e.g. with .NET8.0 and Kestrel.
5+
It can also be used with AspNetCore, e.g. with .NET8.0 and Kestrel.
66

7-
With this module you can compress, deflate / gzip large files (like concatenated *.js or *.css files) to reduce amount of web traffic.
8-
Supports eTag caching: If client sent hashcode match, sends 302 instead of re-sending the same content.
7+
With this module, you can compress (deflate or gzip) large files (like concatenated *.js or *.css files) to reduce the amount of web traffic.
8+
It supports eTag caching: If the client's sent hashcode is a match, send 302 instead of re-sending the same content.
99

1010
This project works on C# and F# and should work on all .NET platforms, also on Windows, and even Mono as well.
1111

docs/content/index.fsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Owin.Compression
1515
======================
1616
17-
Owin.Compression (Deflate / GZip) module ("middleware") for Microsoft OWIN pipeline. Can be used with .NET Full, .NET Core, .NET Standard, .NET6.0, and so on. Works with Selfhost and AspNetCore (e.g. with Kestrel, which is OWIN based server).
17+
Owin.Compression (Deflate / GZip) module ("middleware") for the Microsoft OWIN pipeline. It can be used with .NET Full, .NET Core, .NET Standard, .NET6.0, and so on. It also works with Selfhost and AspNetCore (e.g. with Kestrel, which is OWIN based server).
1818
It compresses the web request responses to make the transfer smaller, and it supports eTag caching.
1919
2020
<div class="row">
@@ -28,14 +28,14 @@ It compresses the web request responses to make the transfer smaller, and it sup
2828
<div class="span1"></div>
2929
</div>
3030
31-
Default compression used is deflate, then gzip, as deflate should be faster.
31+
The default compression used is deflate, then gzip, as deflate should be faster.
3232
3333
eTag-caching
3434
----------
3535
3636
1. When the server reads the content before compression, it calculates a hash-code over it.
3737
2. The hash-code is sent as ETag response header to the client with the response
38-
3. The next time the client asks the same resource, it sends an If-None-Match header in the request with the same value.
38+
3. The next time the client asks for the same resource, it sends an If-None-Match header in the request with the same value.
3939
4. After the server reads the content before the compression, it calculates a hash-code over it. If it matches the If-None-Match of the request, the server can skip the compression and skip the sending and just send http status code 304 to the client which means "use what you have, it's not modified since".
4040
4141
@@ -79,7 +79,7 @@ And now your files are smaller than with e.g. just Microsoft.Owin.StaticFiles -l
7979
8080
<img src="https://raw.githubusercontent.com/Thorium/Owin.Compression/master/screen.png" alt="compressed" width="1000"/>
8181
82-
Even though the browser sees everything as plain text, the traffic is actually transfered as compressed format.
82+
Even though the browser sees everything as plain text, the traffic is actually transferred in compressed format.
8383
You can monitor the traffic with e.g. Fiddler.
8484
8585
Example #2
@@ -164,7 +164,7 @@ Example #4
164164
----------
165165
166166
Running on ASP.NET Core web API on .NET 6.0. You can use C# but this example is in F#
167-
just because shorter syntax. The full project is available at tests-folder of this project:
167+
just because of the shorter syntax. The full project is available in tests-folder of this project:
168168
169169
*)
170170

@@ -200,7 +200,7 @@ https://github.com/Thorium/Owin.Compression/tree/master/tests/Aspnet.Core.WebAPI
200200
Example #5
201201
----------
202202
203-
More complete example can be found <a href="/Thorium/WebsitePlayground">here</a>.
203+
More complete examples can be found <a href="/Thorium/WebsitePlayground">here</a>.
204204
205205
206206
Samples & documentation
@@ -221,10 +221,10 @@ Contributing and copyright
221221
222222
The project is hosted on [GitHub][gh] where you can [report issues][issues], fork
223223
the project and submit pull requests. If you're adding a new public API, please also
224-
consider adding [samples][content] that can be turned into a documentation. You might
224+
consider adding [samples][content] that can be turned into documentation. You might
225225
also want to read the [library design notes][readme] to understand how it works.
226226
227-
The library is available under Public Domain license, which allows modification and
227+
The library is available under a Public Domain license, which allows modification and
228228
redistribution for both commercial and non-commercial purposes. For more information see the
229229
[License file][license] in the GitHub repository.
230230

docs/content/tutorial.fsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
(**
1212
# Using this library (C-Sharp) #
1313
14-
Create new C# console application project (.NET 4.5 or more). Add reference to NuGet-packages:
14+
Create a new C# console application project (.NET 4.5 or more). Add reference to NuGet-packages:
1515
1616
- Microsoft.Owin
1717
- Microsoft.Owin.Hosting
@@ -89,7 +89,7 @@ do()
8989
Microsoft.Owin.Hosting.WebApp.Start<MyWebStartup> "http://*:8080"
9090

9191
(**
92-
Or you can use app.UseCompressionModule() in the beginning of the configuration to compress the whole response.
92+
You can also use app.UseCompressionModule() at the beginning of the configuration to compress the whole response.
9393
*)
9494

9595
type MyWebStartupExample2() =
@@ -100,4 +100,4 @@ type MyWebStartupExample2() =
100100
//app.UseFileServer(fileServerOptions) |> ignore
101101
//etc...
102102

103-
()
103+
()

src/Owin.Compression.Standard/CompressionModule.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,8 @@ type CompressionExtensions =
510510
static member UseCompressionModule(app:IApplicationBuilder) =
511511
CompressionExtensions.UseCompressionModule(app, DefaultCompressionSettings)
512512

513-
/// You can set a path that is url that will be captured.
514-
/// The subsequent url-path will be mapped to server path.
513+
/// You can set a path, which is the URL that will be captured.
514+
/// The subsequent url-path will be mapped to the server path.
515515
[<Extension>]
516516
static member MapCompressionModule(app:IApplicationBuilder, path:PathString, settings:CompressionSettings) =
517517
app.Map(path, fun ap ->
@@ -532,8 +532,8 @@ type CompressionExtensions =
532532
} :> Task
533533
)
534534

535-
/// You can set a path that is url that will be captured.
536-
/// The subsequent url-path will be mapped to server path.
535+
/// You can set a path, which is the URL that will be captured.
536+
/// The subsequent url-path will be mapped to the server path.
537537
/// Uses OwinCompression.DefaultCompressionSettings
538538
[<Extension>]
539539
static member MapCompressionModule(app:IApplicationBuilder, path:PathString) =

src/Owin.Compression/CompressionModule.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type SupportedEncodings =
1515
| Deflate
1616
| GZip
1717

18-
/// Do you fetch files or do you encode context.Response.Body?
18+
/// Do you fetch files, or do you encode context.Response.Body?
1919
type ResponseMode =
2020
| File
2121
| ContextResponseBody of Next: Func<Task>
@@ -458,17 +458,17 @@ type CompressionExtensions =
458458
static member UseCompressionModule(app:IAppBuilder) =
459459
CompressionExtensions.UseCompressionModule(app, DefaultCompressionSettings)
460460

461-
/// You can set a path that is url that will be captured.
462-
/// The subsequent url-path will be mapped to server path.
461+
/// You can set a path, which is the URL that will be captured.
462+
/// The subsequent url-path will be mapped to the server path.
463463
[<Extension>]
464464
static member MapCompressionModule(app:IAppBuilder, path:string, settings:CompressionSettings) =
465465
app.Map(path, fun ap ->
466466
ap.Run(fun context ->
467467
(Internals.compress context settings ResponseMode.File)()
468468
))
469469

470-
/// You can set a path that is url that will be captured.
471-
/// The subsequent url-path will be mapped to server path.
470+
/// You can set a path, which is the URL that will be captured.
471+
/// The subsequent url-path will be mapped to the server path.
472472
/// Uses OwinCompression.DefaultCompressionSettings
473473
[<Extension>]
474474
static member MapCompressionModule(app:IAppBuilder, path:string) =

0 commit comments

Comments
 (0)