Skip to content

Commit a076635

Browse files
committed
Compress vCard files (.vcard/.vcf)
vCard file are basically text files, therefore, they compress quite nicely. Also, browsers don't seem to encounter any problems when these types of files are served compressed.
1 parent 104f232 commit a076635

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

CHANGELOG.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
### HEAD
22

3-
* Serve `.vcf` and `.vcard` file with the `text/vcard` media type.
3+
* Compress vCard files (`.vcard`/`.vcf`).
4+
* Serve vCard files (`.vcard`/`.vcf`) with the `text/vcard` media type
5+
[[104f232](https://github.com/h5bp/server-configs-apache/commit/104f232dad100ddd5c8cf0c354c2bcd163a6b915)].
46
* Add configs for BlackBerry Maps location documents (`.xloc`)
57
[[20000d1](https://github.com/h5bp/server-configs-apache/commit/20000d1741701eede2e0903b2b86992d8b70c35a)].
68
* Add configs for BlackBerry App World files (`.bbaw`)
@@ -42,7 +44,7 @@
4244

4345
### 2.5.0 (June 14, 2014)
4446

45-
* Compress cache manifest files (`.appcache` / `.manifest`)
47+
* Compress cache manifest files (`.appcache`/`.manifest`)
4648
[[d819fec](https://github.com/h5bp/server-configs-apache/commit/d819fecd81e1d23fb5f153995f573890b037a82c)].
4749
* Move all compression related configs under the `Compression` section
4850
[[73a107e](https://github.com/h5bp/server-configs-apache/commit/73a107ed0cb9ae4b3ec966e8e246b7a6f4bbd059)].

dist/.htaccess

+1
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ AddDefaultCharset utf-8
722722
"text/html" \
723723
"text/javascript" \
724724
"text/plain" \
725+
"text/vcard" \
725726
"text/vnd.rim.location.xloc" \
726727
"text/vtt" \
727728
"text/x-component" \

src/web_performance/compression.conf

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"text/html" \
6464
"text/javascript" \
6565
"text/plain" \
66+
"text/vcard" \
6667
"text/vnd.rim.location.xloc" \
6768
"text/vtt" \
6869
"text/x-component" \

test/fixtures/.htaccess

+1
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ AddDefaultCharset utf-8
675675
"text/html" \
676676
"text/javascript" \
677677
"text/plain" \
678+
"text/vcard" \
678679
"text/vnd.rim.location.xloc" \
679680
"text/vtt" \
680681
"text/x-component" \

test/tests.js

-2
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,12 @@ exports = module.exports = {
442442

443443
'test.vcard': {
444444
responseHeaders: {
445-
'content-encoding': null,
446445
'content-type': 'text/vcard'
447446
}
448447
},
449448

450449
'test.vcf': {
451450
responseHeaders: {
452-
'content-encoding': null,
453451
'content-type': 'text/vcard'
454452
}
455453
},

0 commit comments

Comments
 (0)