JANUS WEB TYPE
Assign mime-type to page suffix
The JANUS WEB TYPE command indicates the mime type of the output produced by the specified URL (url value).
JANUS WEB portname TYPE [method] url mime_type
portname, method, and url are all explained under the JANUS WEB command.
mime_type is the mime type sent to the requesting browser. It should consist of two parts: the primary type and the subtype. The primary type and subtype should be separated by a forward slash (/).
No checking is made for a valid mime type as there is no exhaustive list of all valid mime types. In fact, new mime types can be invented for applications as deemed necessary. A browser can even be made to launch local applications by specifying your own mime type, in the form application/myapp where myapp is a locally specified token that will have to be manually associated with the application on each client machine.
Other than being sent verbatim to the browser, the primary mime type (the part before the slash) is used by Janus Web Server to determine whether EBCDIC-to-ASCII translation is to take place. If the primary mime type is
text, output data will be translated from EBCDIC to ASCII, unless explicitly overridden by a BINARY, TEXT, or BASE64 format parameter on a JANUS WEB ON rule or in a $Web_Proc_Send function. Data that is sent to the browser via the "terminal" — for example, Print statements or error messages — is always translated from EBCDIC to ASCII, regardless of the output mime type.
The following are some of the standard and more common mime types used in web applications:
|text/plain||Text that is displayed at the browser in a monospace typeface, like Courier. Display of |
By default, any URL that does not end in one of the standard suffixes (HTM, HTML, GIF, JPG, JPEG) is assumed to be
|text/html||Text that contains HTML markup tags. Most formatted text in web applications is sent as |
|text/xml||Readable text with markup which parses as an XML document.|
|image/gif||Binary data conforming to the Compuserve GIF image format. This is one of the most popular formats for storing graphical images. By default, any URL ending in ".GIF" is assumed to produce output with a mime type of |
|image/jpeg||Binary data conforming to the JPEG image standard. This is one of the most popular formats for storing graphical images. By default, any URL ending in ".JPG" or ".JPEG" is assumed to produce output with a mime type of |
|application/pdf||Binary data that is intended to be read by the Adobe Acrobat Reader™.|
|application/x-java||Binary data that contains Java object code that is to be executed in the browser's Java virtual machine.|