INTEGRAL Web Server Configuration Keywords
Jump directly to:
MIMETYPE_STCMPR_ALL_EXCEPT[]
MIMETYPE_STCMPR_NONE_EXCEPT[]
MULTI These two keywords add a new compressed file handler to INTEGRAL Web Server's list of recognized MIME type handlers and enable it for the specified websites. MIMETYPE_STCMPR_ALL_EXCEPT enables the handler for all websites except the ones listed within the square brackets. MIMETYPE_STCMPR_NONE_EXCEPT enables the handler only for those websites that are listed within the square brackets.
The websites listed within the square brackets are called exception sites and are specified by their unique order number. The default INTEGRAL website is always website #0, the first additional website spawned using the WEBSRV_EXTRA_SITE keyword is website #1, the second one is #2 etc. If multiple exception sites need to be listed, they are separated by a single comma. If there are no exception sites, nothing should be included inside the square brackets (but the brackets themselves must still be present). For example, MIMETYPE_STCMPR_ALL_EXCEPT[0,1,5] activates the handler for all websites except #0, #1 and #5 while MIMETYPE_STCMPR_ALL_EXCEPT[] activates the handler for all websites. Similarly, MIMETYPE_STCMPR_NONE_EXCEPT[2,4] activates the handler only for websites #2 and #4 while MIMETYPE_STCMPR_NONE_EXCEPT[] does not activate the handler for any site.
Immediately after the closing square bracket is the equal sign (=) followed by the value of the keyword. This value is a complex string called a delivery specification. The delivery specification consists of 3 or 4 parts separated by a single colon (:). The first three parts are required, the last one is optional:
Part 1: MIME Type identifier, as defined by IANA's official registry of MIME types
. For example: text/html, image/png, image/svg+xml, text/css etc.
Part 2: File extension (of an already gzip-compressed file type) to be associated with the above MIME Type, in the format *.<extension>. For example: *.htm.gz, *.js.gz, *.svg.gz, *.css.gz etc.
Part 3: Should always be set to PASS. PASS means that the file should be delivered unchanged (which means already gzip-compressed).
Part 4 (optional): max-age to be sent with the Cache-Control HTTP header to the clients when the file is served. The max-age directive states the maximum amount of time in seconds that fetched responses are allowed to be used again (from the time when a request is made). For instance, max-age of 90 indicates that a response can be reused (i.e. remain in the browser cache) for the next 90 seconds.
Here are a few examples that demonstrate how to use the MIMETYPE_STCMPR_ALL_EXCEPT[] and MIMETYPE_STCMPR_NONE_EXCEPT[] keywords.
Example 1a
!MIMETYPE_STCMPR_ALL_EXCEPT[]=image/svg+xml:*.svg.gz:PASS:1209600
Description: Add and enable a new compressed file handler for all websites served by INTEGRAL Web Server. Send the "image/svg+xml" MIME type when serving any files with .svg.gz extension. Deliver those files unchanged (gzip-compressed) and set max-age in Cache-Control HTTP header to 1209600 seconds (or 2 weeks).
Example 1b
!MIMETYPE_STCMPR_NONE_EXCEPT[]=image/svg+xml:*.svg.gz:PASS:1209600
Description: Add a new compressed file handler but don't enable it for any website served by INTEGRAL Web Server. Send the "image/svg+xml" MIME type when serving any files with .svg.gz extension. Deliver those files unchanged (gzip-compressed) and set max-age in Cache-Control HTTP header to 1209600 seconds (or 2 weeks). Note that INTEGRAL Web Server will not be able to serve any .svg.gz files if the handler is set up exactly as shown here (i.e. without any exception sites). However, as soon as the first exception site is included within the square brackets, the delivery specification after the equal sign will become relevant and effective.
Example 2a
!MIMETYPE_STCMPR_ALL_EXCEPT[]=image/svg+xml:*.svg.gz:PASS
Description: Same as Example 1a except that the max-age directive is not specified (and therefore not sent as part of the Cache-Control HTTP header).
Example 2b
!MIMETYPE_STCMPR_NONE_EXCEPT[]=image/svg+xml:*.svg.gz:PASS
Description: Same as Example 1b except that the max-age directive is not specified (and therefore not sent as part of the Cache-Control HTTP header).
Example 3a
!MIMETYPE_STCMPR_ALL_EXCEPT[10,11,12]=image/svg+xml:*.svg.gz:PASS:1209600
Description: Same as Example 1a except that the compressed file handler is not enabled for websites #10, #11 and #12.
Example 3b
!MIMETYPE_STCMPR_NONE_EXCEPT[10,11,12]=image/svg+xml:*.svg.gz:PASS:1209600
Description: Same as Example 1b except that the compressed file handler is only enabled for websites #10, #11 and #12.
Example 4a
!MIMETYPE_STCMPR_ALL_EXCEPT[10,11,12]=image/svg+xml:*.svg.gz:PASS
Description: Same as Example 2a except that the compressed file handler is not enabled for websites #10, #11 and #12.
Example 4b
!MIMETYPE_STCMPR_NONE_EXCEPT[10,11,12]=image/svg+xml:*.svg.gz:PASS
Description: Same as Example 2b except that the compressed file handler is only enabled for websites #10, #11 and #12.