Using Gzip to compress MIME types (IANA media types) with Azion
Whenever a browser page is viewed, the webserver sends specific information regarding the page. Such details are in the page headers: they are important so the web browser can load and interpret the page.
In these cases, one of the headers is the Content-Type, responsible for processing and presenting the page content.
This sort of content is also called MIME type (Multipurpose Internet Mail Extensions), therefore determinant to define the type of document, files, or array of bytes, and how it should be processed.
Structure
A MIME type consists of a type and subtype. They are strings that, combined with a /
symbol in between, will form the MIME type.
The type represents the category of that data file, whether it’s text
or image
. The subtype stands for exact data type represented by the MIME type. For instance, the MIME type image
could be jpeg
or png
.
To compress images, use Azion’s Image Processor module for Edge Application. Read more
Even though it may look similar to a file extension, they are not the same. For example, a .png file will have image/png
as a MIME type.
A MIME type will always have both extensions; that is, a type and a subtype.
So when your browser runs into an <img>
tag, it sends out a request to the server, and if this image is a .png, the server will return with content-type: image/png
.
Usage
To ensure a faster connection with your website, Azion provides files compression using Gzip. Smaller files result in faster downloads and faster page renderings for users.
When you set the Gzip behavior on Real-Time Manager’s Rules Engine, this is how the content is served:
-
Azion will verify the cache for a compressed version of the file at the edge location.
-
If the file is already compressed, it will be delivered to the viewer. If not, Azion will then compress the file, return it to the viewer, and add it to the cache.
-
The viewer will decompress the file.
File types that Azion compresses:
MIME Type | Extension | Document Type |
---|---|---|
application/eot | .eot | MS Embedded OpenType fonts |
application/font | OpenType font | |
application/font-sfnt | .ttf .otf |
SFNT format |
application/font-woff | .woff | Web Open Font Format (WOFF) |
application/font-woff2 | .woff2 | Web Open Font Format 2 (WOFF2) |
application/javascript | .js | JavaScript |
application/json | .json | JSON format |
application/ld+json | .jsonld | JSON-LD format |
application/opentype | .otf .otc .ttf .ttc |
OpenType |
application/otf | .otf | OpenType |
application/truetype | .ttf .tte |
TrueType |
application/ttf | .ttf | TrueType |
application/vnd.ms-fontobject | .eot | MS Embedded OpenType fonts |
application/x-font-opentype | .otf | OpenType |
application/x-font-truetype | .ttf | TrueType |
application/x-font-ttf | .ttc .ttf |
TrueType |
application/x-httpd-cgi | .pl .sh .cgi |
CGI scripts/programs |
application/x-javascript | .js | JavaScript |
application/x-mpegurl | .M3U8 | iPhone Index |
application/x-opentype | .ttc | OpenType font |
application/x-otf | .otf | OpenType font |
application/x-perl | .plx .pl .pm .xs .t .pod |
Perl script |
application/x-ttf | .ttf | TrueType |
application/xhtml+xml | .xhtml | XHTML |
application/xml+rss | .rss .xml |
RSS, Atom and XML |
font/eot | .eot | Embedded Open Type |
font/opentype | otf .otc .ttf .ttc |
OpenType font |
font/otf | .otf | OpenType font |
font/ttf | .ttf | TrueType font |
image/svg+xml | .svg | Scalable Vector Graphics (SVG) |
image/x-icon | .ico | ICO |
text/css | .css | Cascading Style Sheets (CSS) |
text/csv | .csv | Comma-separated values (CSV) |
text/html | .htm .html |
HyperText Markup Language (HTML) |
text/javascript | .js | JavaScript |
text/js | .js | JavaScript |
text/plain | .txt | Text (generally ASCII or ISO 8859-n) |
text/richtext | .rtf | Rich Text Format |
text/tab-separated-values | .tsv .tab |
Tab-separated values |
text/x-component | .htc | HTML Components |
text/x-java-source | .jav | Java Source |
text/x-markdown | .md | Markdown |
text/x-script | .hlb | HP OpenVMS |
text/xml application/xml |
.xml | XML |
The entity responsible for all official MIME types is the Internet Assigned Numbers Authority (IANA)
Didn’t find what you were looking for? Open a support ticket.