2022-06-30 14:22:59 +02:00
---
title: Nginx
2022-11-19 15:25:20 +01:00
visible: true
2022-06-30 14:27:49 +02:00
media_order: content-encoding-type.png
2022-06-30 14:22:59 +02:00
---
[toc]
2023-04-02 15:53:58 +02:00
2023-02-23 14:48:51 +01:00
Interesting options, configurations and information about nginx.
2022-06-30 14:22:59 +02:00
## Compression
2023-02-23 14:48:51 +01:00
_NOTE: The most reliable way to check whether content is compressed, is by using the debug tools in the webbrowser. Look for the "content-encoding" header_
![Picture shows parts of the response headers in the network tab of the firefox debug tool ](content-encoding-type.png )
2022-06-30 14:27:49 +02:00
These are the settings used by this website to compress with gzip.
2023-02-23 14:48:51 +01:00
These will suffice for most websites.
```nginx
2022-06-30 14:27:49 +02:00
# Compression
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_http_version 1.1;
gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
```
2023-02-23 14:48:51 +01:00
> All configuration options can be found in the [official documentation](https://nginx.org/en/docs/http/ngx_http_gzip_module.html)
2022-06-30 14:27:49 +02:00
## Website Performance
2023-02-23 14:48:51 +01:00
> Google's [PageSpeed Insights](https://pagespeed.web.dev/) tool can be used to measure website performance.