Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Opera Mini request headers

By Kristian von Streng Hæhre · 7 Nov, 2007

Published in: , ,

(with a couple of sections provided by Chris Mills)

Introduction

Opera Mini uses a number of custom, unregistered HTTP headers. Most of these are specific to Mini, and are sent in addition to the regular HTTP headers sent by Opera on any platform. The purpose of these headers is to give site owners information about the user's handset and its capabilities/features. Some headers are mandatory and will be sent with every request, others are optional.

X-OperaMini-Features (mandatory)

This header contains a comma-separated list of features supported by the phone. This can be used for capability detection before serving content.

Format

X-OperaMini-Features: <feature> *[ , <feature> ]

Example

X-OperaMini-Features: advanced, camera, folding, secure

Possible values

  • basic - MIDP 1 version of Mini (also referred to as the low memory version).
  • advanced - MIDP 2 version of Mini (also referred to as the high memory version). See the Opera Mini FAQ page for a description of the differences between the MIDP1 and MIDP2 versions of Opera Mini.
  • camera - Camera support detected. The user will be able to upload a photo when Mini encounters a file input element (<input type="file">).
  • file_system - File system support detected. The user will be able to save files on the device that are not handled natively by Opera Mini, and upload files when Mini encounters a file input element (<input type="file">).
  • folding - Content folding is supported and enabled.
  • secure - The connection between Mini's client and proxy server is encrypted. All versions of Mini support SSL encryption between proxy server and web server, but only 3.0 and later supports client to proxy encryption.

X-OperaMini-Phone-UA (optional)

This header contains the user-agent string of the client that downloaded the .jad file (if available - otherwise it contains the user-agent reported to the client by the device.)

Format

X-OperaMini-Phone-UA: <user-agent>

Example

X-OperaMini-Phone-UA: SonyEricssonK750i/R1AA Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1

X-OperaMini-Phone (optional)

This contains the manufacturer and model name/number of the device, provided the device makes this information available to Opera Mini.

Format

X-OperaMini-Phone: <manufacturer> # <model>

Example

X-OperaMini-Phone: SonyEricsson # K750i

X-Forwarded-For (mandatory)

This contains a comma-separated list of the proxy servers the request has passed on its way from the device to the Mini proxy. The last item in the list will always be the IP address that connects to the Mini proxy, hence it is the most reliable source of information about the origin of the request, and is suitable for geolocation etc.

Format

X-Forwarded-For: <IP address> *[ , <IP address> ] 

Example

X-Forwarded-For: 10.30.0.1, 130.236.236.80

Accept-Language (mandatory)

Accept-Language specifies what language(s) the browser would prefer the response to be written in. You can specify multiple languages in a comma-delimited list using standard language tags, and each language can be given a quality value that indicates the user's ability in those languages (this value defaults to 1 if not specified, which is the highest - the values range from 0 to 1.) For example, the actual example given at the bottom of this section means "I'd prefer to be sent old (bokmal) or new Norwegian, but I am also pretty good at English...I'll also try French if you've not got the other two languages available, but I'm not very good at that." If Accept-Language is not specified, then the server should assume that all languages are acceptable to the user.

Format

Accept-Language: <language tag>;q=<quality value>, ...

Example

Accept-Language: no-bok, no-nyn, en;q=0.8, fr;q=0.4

digg Digg this article  del.icio.us Add to del.icio.us

Article categories