Skip to content

Commit 0bb12c8

Browse files
committed
Compress WebVTT files (.vtt)
* WebVTT files are basically text files, therefore, they compress quite nicely. * Browsers that have support for WebVTT don't encounter any problems when the `.vtt` files are being served compressed. Ref: http://dev.w3.org/html5/webvtt/ http://tools.ietf.org/html/draft-pantos-http-live-streaming-13
1 parent c6ce70f commit 0bb12c8

File tree

4 files changed

+3
-1
lines changed

4 files changed

+3
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### HEAD
22

3+
* Compress WebVTT files (`.vtt`).
34
* Reintroduce the `filename extension` to `content type` mappings for `ico`
45
and `svg` ([#28](https://github.com/h5bp/server-configs-apache/issues/28)).
56

src/.htaccess

+1
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ AddDefaultCharset utf-8
524524
text/css \
525525
text/html \
526526
text/plain \
527+
text/vtt \
527528
text/x-component \
528529
text/xml
529530
</IfModule>

test/fixtures/content/.htaccess

+1
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ AddDefaultCharset utf-8
513513
text/css \
514514
text/html \
515515
text/plain \
516+
text/vtt \
516517
text/x-component \
517518
text/xml
518519
</IfModule>

test/test.js

-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ var tests = [
399399

400400
'test.vtt': {
401401
headers: generateHeaders({
402-
'content-encoding': undefined,
403402
'content-type': 'text/vtt; charset=utf-8'
404403
})
405404
},

0 commit comments

Comments
 (0)