Content Type

The Content-Type HTTP response header describes various aspects of the content that is being sent, including the character set, encoding, and MIME type. For most mobile content, the content type header looks like this:

Content-Type: text/xhtml; charset=utf-8

The first aspect of the Content-Type header is the Multipurpose Internet Mail Extensions (MIME) type. A MIME type is a media designation included in the header of a Web page that tells the mobile browser how to interpret the code that it is sending, and it is the value returned in the Content-Type request. MIME types also help the mobile browser determine when a file is supposed to be launched in the browser and when it should be launched as an application or in a separate program.

The MIME designation always includes a main type and a subtype, which are separated by a forward slash; thus, the MIME type for an image might be image/GIF. Eight primary MIME types exist: application, audio, image, message, model, multipart, text, and video. Table 9.1 shows some of the more common mobile MIME types (excluding some media MIME types, which are covered later).

Table 9.1 Common Mobile M

1IME Types

Extension

Remark

application/java-archive

Binary

Java archive

application/java-archive

.jar

Java archive

application/mtf

.mtf

Motorola theme

application/vnd.alcatel.animation

.ani

Alcatel animation (converted animated GIF file)

application/vnd.alcatel.colorpalette

.pco

Alcatel image (256-color picture)

Chapter

9 Mobile

Website Development 163

Extension

Remark

application/vnd.alcatel.picture

.pic

Alcatel icon

application/vnd.alcatel.seq

.seq

Alcatel polytone (converted MIDI file)

application/vnd.alcatel.vox

.vox

Alcatel sound format (converted WAV file)

application/vnd.eri.thm

.thm

Sony Ericsson theme

application/vnd.mophun.application

.mpn

Sony Ericsson mophun game file; this file runs only on a mophun runtime environment

application/vnd.nokia.gamedata

.nqd

Nokia game data

application/vnd.Nokie.ringing-tone

.rng

Nokia ringtone

application/vnd.nok-s40theme

.nth

Nokia theme

application/vnd.rn-realmedia

.rm

RealMedia video format

application/vnd.siemens-mp.skin

.scs

Siemens color scheme; compressed file containing several files

application/vnd.siemens-mp.theme

.sdt

Siemens theme file; compressed file containing several files

application/vnd.symbian.install

.sis

Symbian installation

application/vnd.symbian.install

.sis

Symbian installer

application/vnd.wap.mms-message

.mms

Binary MMS in MMS Encapsulation Protocol format

application/vnd.wap.xhtml+xml

.xhtml

XHTML-MP markup

application/xhtml+xml

.xhtml

XHTML-MP markup

application/x-nokiagamedata

.ngd

Nokia game data

application/x-pmd

.pmd

Polyphonic ringtone format

application/x-smaf

.mmf

Samsung truetone format

audio/adpcm

.adp

LG truetone format

audio/midi

.mid

MIDI audio format (ringtones)

audio/midi

.midi

MIDI audio format (ringtones)

audio/vnd.qcelp

.qcp

QCELP audio file

audio/x-aac

.aac

Nokia audio format

image/gif

.gif

GIF format

image/jpeg

.jpeg

JPEG format

Table 9.1 Continued

Extension

Remark

image/jpg

.jpg

JPG format

image/png

png

PNG format

image/vnd.nok-3dscreensaver

.n3a

Nokia screensaver

image/vnd.nok-oplogo-color

.nol

Nokia operator logo (GIF image)

image/vnd.wap.wbmp

.wbmp

WAP content: WAP bitmap image

image/vnd.wap.wbmp

.wbmp

Wireless bitmap Image

image/x-bmp

.bmp

BMP image

text/css

.css

CSS1, CSS2, and wireless CSS

text/html

.html

HTML

text/vnd.sun.j2me.app-descriptor

.jad

J2ME content: Java descriptor file

text/vnd.wap.wml

.wml

WML markup

text/vnd.wap.wmlscript

.wmls

WML Script

text/x-co-desc

.cod

Nokia Content Object Description file

text/x-emelody

.emy

Sony Ericsson eMelody sound format

text/x-imelody

.imy

iMelody, a feature-rich ringtone format

text/x-vCalendar

.vcs

vCalendar, a format for electronic calendaring and scheduling

text/x-vCard

.vcf

Exchanging information about people and resources

video/avi

.avi

AVI video format

video/mpeg

.mpeg

MPEG video format

x-epoc/x-sisx-app

.sisx

Symbian installer

x-nokia-widget

.wgz

Nokia Widget Archive

Most Web servers do not come preconfigured to support mobile MIME types, although this is becoming more common. If you are serving mobile content, it is a good idea to check your servers and manually add any mobile MIME types that are not already present and recognized by the Web server.

Most Web servers do not come preconfigured to support mobile MIME types, although this is becoming more common. If you are serving mobile content, it is a good idea to check your servers and manually add any mobile MIME types that are not already present and recognized by the Web server.

In some cases, devices can accept multiple file types but still have a preference, usually because the device has a more complete and comprehensive capability to execute a specific file type. You might be able to use a combination of User-Agent headers, accept headers, and a User-Agent profile (UAProf.) to provide the preferred type of content based on the handset that is accessing the site.

The second part of the Content-Type header is the character set, or charset. The character set you choose can impact the bandwidth necessary to transmit a page, because some characters require more memory than others. If your website is written primarily in Latin-based characters and languages, such as English, French, and German, you should be using UTF-8. If your website is written in non-Latin characters, such as Chinese, Japanese, or Hebrew, UTF-16 is ideal.

Continue reading here: Tracking Mobile SEO and Keyword Rankings

Was this article helpful?

0 0