Titania X3D Editor

Bring Colours to Your Life.

Titania v4.6.10

Bring Colours to Your Life.

X3D Reference

How to Configure Your Web Server

X3D MIME Types and File Extensions

The MIME Type is used to indicate the media type of a file that is to be displayed over the Internet. The web server typically uses the file extension as the indicator of the media type of the file. The MIME type is the key that a web browser uses to correctly interpret the bytes in a file so it is critical that the MIME type correctly reflect the media and encoding of the file.

For X3D developers this means they need to be aware of X3D file types and be able to set MIME Types on their own web server/host.

The base MIME type for X3D files is: model/x3d. Each file format has its own modifier. XML is +xml, JSON is +json, Classic VRML is +vrml. The following table summarizes the file extension, MIME type, and X3D encoding:

X3D Encoding File Extension MIME Type
XML .x3d, .x3dz model/x3d+xml
JSON .x3dj model/x3d+json
Classic VRML .x3dv, .x3dvz model/x3d+vrml
Binary .x3db, .x3dbz model/x3d+binary
VRML .wrl, .wrz model/vrml

The standard mechanism for indicating gzipped files is for the web server to set a special header field called »Content-Encoding«. This field indicates if the content has been encoding beyond that present in the media. This is the field that is used to indicate that the file has been compressed with gzip. When the web browser detects this field, it is responsible for gunzipping the file prior to passing it to the X3D browser.

If the file is gzipped, then the content-encoding value is »gzip« with the appropriate Classic VRML or X3D Binary extension. So gzip .x3dvz and gzip .x3dbz.

The simplest way to set your server to correctly display X3D files is to add the following to your document root's .htaccess file:

Because X3D files are pure text you can compress them on the fly. This can reduce the file size up to a factor of ten:

Cookies and other Technologies

By clicking »Accept« or continuing to use the site, you agree to the use of CREATE3000 and third-party cookies and other similar technologies to enhance your browsing experience, analyze and measure your engagement with our content, and provide more relevant ads on CREATE3000 websites and others. Learn more about cookies. You can withdraw your consent at any time.

create3000.de is going to be shut down next year, but we have a new clean and slick web site for you, go to new X_ITE web site, consider updating your X_ITE URL's, or go to new Titania web site or continue reading.