Developers guidelines
March 2009 NetFront™ v3.3–3.4 Web browser in Sony Ericsson phones Developers guidelines | NF3 Web browser
Preface
Purpose of this document
This document describes how to develop Web pages for the browsers in the phones listed under “Products” on page 3.
The document is intended for content developers for Sony Ericsson phones. The main purpose is not to instruct the reader how to write HTML and XHTML content, but to describe how the phone browser interprets tags and attributes.
People who may benefit from this document are:
• Content developers • Operators and service providers • Content providers.
It is assumed that the reader is familiar with the markup languages HTML and XHTML, and the style sheet language CSS.
These Developers guidelines are published by: This document is published by Sony Ericsson Mobile Communications AB, without any Sony Ericsson Mobile Communications AB, warranty*. Improvements and changes to this text necessitated by typographical errors, inaccuracies SE-221 88 Lund, Sweden of current information or improvements to programs and/or equipment, may be made by www.sonyericsson.com/ Sony Ericsson Mobile Communications AB at any time and without notice. Such changes will, however, be incorporated into new editions of this © Sony Ericsson Mobile Communications AB, document. Printed versions are to be regarded as 2005. All rights reserved. You are hereby granted temporary reference copies only. a license to download and/or print a copy of this document. *All implied warranties, including without limitation Any rights not expressly granted herein are the implied warranties of merchantability or fitness for a particular purpose, are excluded. In no event reserved. shall Sony Ericsson or its licensors be liable for incidental or consequential damages of any 25th edition (March 2009) nature, including but not limited to lost profits or Publication number: EN/LZT 108 8099 R25A commercial loss, arising out of the use of the information in this document.
2 March 2009 Developers guidelines | NF3 Web browser
Sony Ericsson Developer World
At www.sonyericsson.com/developer, developers find the latest technical documentation and development tools such as phone White papers, Developers guidelines for different technologies, Getting started tutorials, SDKs (Software Development Kits) and tool plugins. The Web site also features news articles, go-to-market advice, moderated discussion forums offering free technical support and a Wiki community sharing expertise and code examples.
For more information about these professional services, go to the Sony Ericsson Developer World Web site.
Document conventions
Products
Sony Ericsson mobile phones are referred to in this document using generic names. The table also lists the NetFront browser version, which phones support Web feeds (RSS), and which phones emulate mouse cursors in the browser.
Generic names Sony Ericsson mobile phones Browser Web feed Mouse Series version support cursor UI
C510 C510, C510c, C510a 3.4 Yes Yes
C702 C702, C702c, C702a 3.4 Yes Yes
C901 C901, C901a 3.4 Yes Yes
C902 C902, C902c 3.4 Yes Yes
C903 C903, C903a 3.4 Yes Yes
C905 C905, C905c, C905a 3.4 Yes Yes
G502 G502, G502c 3.4 Yes Yes
G705 G705, G705u 3.4 Yes Yes
K310 K310i, K310c, K310a 3.3
K320 K320i, K320c 3.3
K510 K510i, K510c 3.3
K530 K530i 3.3 Yes
K550 K550i, K550c 3.3 Yes
K630 K630i 3.4 Yes
3 March 2009 Developers guidelines | NF3 Web browser
K660 K660i 3.4 Yes Yes
K770 K770i 3.3 Yes
K790 K790i, K790c, K790a 3.3 Yes
K800 K800i, K800c 3.3 Yes
K810 K810i, K818c 3.3 Yes
K850 K850i, K858c 3.4 Yes
S500 S500i, S500c 3.3 Yes
T650 T650i, T658c 3.3 Yes
T700 T700 3.4 Yes Yes
T707 T707, T707a 3.4 Yes Yes
V640 V640i 3.4 Yes
W200 W200i, W200c 3.3
W300 W300i, W300c 3.3
W350 W350i, W350c 3.3 Yes
W380 W380i, W380c 3.3 Yes
W508 W508, W508c, W508a, W518a 3.4 Yes Yes
W550 W550i, W550c 3.3
W580 W580i, W580c 3.3 Yes
W595 W595, W595s 3.4 Yes Yes
W600 W600i 3.3
W610 W610i, W610c 3.3 Yes
W660 W660i 3.3 Yes
W705 W705, W705u 3.4 Yes Yes
W710 W710i, W710c 3.3 Yes
W715 W715 3.4 Yes Yes
W760 W760i, W760c 3.4 Yes Yes
W810 W810i, W810c, W810a 3.3
W830 W830i, W830c 3.3 Yes
W850 W850i, W850c 3.3 Yes
W880 W880i, W888c 3.3 Yes
W890 W890i 3.4 Yes Yes
W900 W900i 3.3
W902 W902 3.4 Yes Yes
4 March 2009 Developers guidelines | NF3 Web browser
W910 W910i, W908c 3.4 Yes
W980 W980i 3.4 Yes Yes
W995 W995, W995a 3.4 Yes Yes
Z310 Z310i, Z310a 3.3 Yes
Z530 Z530i, Z530c 3.3
Z550 Z550i, Z550c, Z550a 3.3
Z555 Z555i, Z555a 3.3 Yes
Z558 Z558i, Z558c 3.3
Z610 Z610i 3.3 Yes
Z710 Z710i, Z710c 3.3 Yes
Z750 Z750i 3.4 Yes
Z770 Z770i 3.4 Yes Yes
Z780 Z780i, Z780a 3.4 Yes Yes
Terminology
AJAX Asynchronous JavaScript and XML
A web development technique for creating interactive web applications. By exchanging small amounts of data with the server “behind the scene”, the entire web page does not have to be reloaded each time the user requests a change. CSS Cascading Style Sheets
De facto standard style sheet language, defined by the W3C and supported by IE, Net- scape and Opera HTML Hypertext Markup Language
The original Web markup language, supported by IE, Netscape and Opera. Most Web pages are HTML documents I-mode An extended subset of HTML, defined by NTT DoCoMo HTML OMA Open Mobile Alliance
The primary standardisation organisation for mobile applications. See http://www.openmobilealliance.org/ RSS Really Simple Syndication
A format for Web feeds
W3C The World Wide Web Consortium
5 March 2009 Developers guidelines | NF3 Web browser
The primary standardisation organisation on the Web. See http://www.w3.org/
WCSS Wireless CSS
An extended subset of CSS defined by the OMA
XHTML Extensible Hypertext Markup Language
The latest version of HTML is called XHTML, since it is based on XML. On a functional level, HTML and XHTML are essentially the same. On a syntactical level, XHTML requires the author to be more careful with syntax. The stricter syntax which XHTML inherits from XML, makes the code easier to process XHTML A subset of XHTML defined by the W3C Basic XHTML A subset of XHTML, a superset of XHTML Basic, defined by OMA Mobile profile XML A set of syntactical rules for markup languages. All new markup languages, such as Scalable Vector Graphics (SVG) and Synchronized Multimedia Integration Language (SMIL) are based on XML
Typographical conventions
The following typographical conventions are used in this document.
HTML element names are written inside “<“ and “>”:
Code is written in Courier font: ..
Trademarks and acknowledgements
NetFront is Internet browsing software of ACCESS CO., LTD.
NetFront, Rapid-Render and Smart-Fit Rendering are trademarks or registered trademarks of ACCESS CO., LTD. in Japan and other countries.
Memory Stick Duo, Memory Stick PRO Duo and Memory Stick Micro™ (M2™) are trademarks or registered trademarks of Sony Corporation.
MicroSD and Transflash are trademarks or registered trademarks of SanDisk Corporation.
Other product and company names mentioned herein may be the trademarks of their respective owners.
6 March 2009 Developers guidelines | NF3 Web browser
Document history
Change history
2005-10-17 Version R1A First edition. Information about the W600, W550 and W900 series
2005-10-25 Version R1B Minor editorial changes
2006-01-04 Version R2A Second edition. Information added about the W810 series
2006-02-13 Version R3A Third edition. Information added about the K610 series
2006-02-28 Version R4A Fourth edition. Information added about the K800, K790, Z530, W300, K510 and K310 series
2006-05-19 Version R5A Fifth edition. Information added about the Z550, W850, Z710 and W710 series
2006-06-12 Version R5B Fifth revised edition
2006-08-22 Version R6A Sixth edition. Information added about the K618i and the Z610 series
2006-09-25 Version R7A Seventh edition. Information added about W830, K320 and Z558 series and the Z550a
2006-12-04 Version R8A Eighth edition. Information added about Z310 series
2007-01-08 Version R9A Ninth edition. Information added about W200 series
2007-02-06 Version R10A 10th edition. Information added about W880, K550, W610 and K810 series
2007-03-13 Version R11A 11th edition. Information added about W660 series
2007-05-08 Version R12A 12th edition. Information added about S500, T650, W580 and Z750 series. NetFront version 3.4 and RSS information added
2007-06-14 Version R13A 13th edition. Information added about K530, K850 and W910 series
2007-08-21 Version R14A 14th edition. Information added about K770 series
2007-09-21 Version R15A 15th edition. Information added about V640 series
2007-11-06 Version R16A 16th edition. Information added about K630, K660, W380 and W890 series
7 March 2009 Developers guidelines | NF3 Web browser
Change history
2008-02-20 Version R17A 17th edition. Information added about C702, C902, W350, W760, W980, Z555 and Z770 series
2008-05-20 Version R18A 18th edition. Information added about G502 and Z780 series
2008-06-17 Version R19A 19th edition. Information added about C905 series
2008-07-22 Version R20A 20th edition. Information added about T700, W595 and W902 series
2008-09-09 Version R21A 21st edition. Information added about G705 series
2008-10-17 Version R21B 21st revised edition. New document layout
2008-11-11 Version R22A 22nd edition. Information added about W705 series
2009-01-09 Version R23A 23rd edition. Information added about C510 and W508 series
2009-02-15 Version R24A 24th edition. Information added about C901, C903, W715 and W995 series
2009-03-26 Version R25A 25th edition. Information added about T707 series
8 March 2009 Developers guidelines | NF3 Web browser
Contents
Overview ...... 10 Technology and architecture ...... 10
HTML support ...... 12 Content vs design ...... 12 Elements and attributes ...... 13
Cascading Style Sheets ...... 35 CSS ...... 35
Scripting ...... 56
URI schemes ...... 74
Web feeds (RSS feeds) ...... 77
Server-side development ...... 78 Identifying the browser ...... 78
Cache ...... 81
Download ...... 82 Download methods ...... 82 Appendix 1 – Phone features ...... 87 Features ...... 88 Appendix 2 – Examples ...... 90 Streaming video in an embedded window ...... 91
9 March 2009 Developers guidelines | NF3 Web browser
Overview
The Web browser is a development platform that lets content providers create content with standard Web technologies such as HTML (Hypertext Markup Language) and the style sheet language CSS (Cascading Style Sheets).
Technology and architecture
Multimedia download services (for example download of ringtones and video clips) have become an increasingly important category of Web-based services. A separate section of this document is devoted to download services and the use of the OMA Download standard.
NetFront™ v3.3 and v3.4 browser (NF3)
NetFront™ v3.3 and v3.4 browser engines, utilised in the Sony Ericsson phone models within the scope of this document, includes support for WAP 2.0, WML, HTML 4.01, XHTML and CSS2. The browser uses Rapid-Render™, which is an incremental rendering technology that significantly accelerates the presentation of Web pages, and Smart-Fit Rendering™, a rendering technology that intelligently renders Web pages to fit the screen width of mobile devices, eliminating the need for horisontal scrolling.
Column Rendering is a rendering mode implemented in phones with mouse cursor interface emulation. When Smart-Fit is deactivated in these phones, pages are rendered using this method. Without Column Rendering, text exceeding the screen width requires repeated use of the scroll bar. With Column Rendering this issue has been resolved:
• Text content is rendered to fit the width of the screen using a line break function. • Column Rendering renders almost exactly what you would see on a PC, also supporting vertical scrolling.
Browser compliancy
The Web browser is compliant with the following standards:
• HTML ver. 4.01, www.w3.org/TR/html401
• XHTML Basic 1.0, http://www.w3.org/TR/xhtml-basic
• XHTML 1.1, Module-based XHTML, http://www.w3.org/TR/xhtml11
• XHTML Mobile profile, http://www.openmobilealliance.org/
10 March 2009 Developers guidelines | NF3 Web browser
• Compact HTML for Small Information Appliances, http://www.w3.org/TR/1998/NOTE-compactHTML-19980209
• WML 1.3, http://www.openmobilealliance.org/
• Cascading Style Sheets, level 2 revision 1, CSS 2.1 Specification, http://www.w3.org/TR/CSS21
• ECMA-script according to specifications found at http://www.ecma-international.org/publications/standards/Stnindex.htm
• ECMAScript Mobile Profile,
• Document Object Model Level 2 (DOM 2), http://www.w3.org/DOM/DOMTR#dom2
• Scalable Vector Graphics, Mobile SVG Profile: SVG Tiny, version 1.1+ http://www.w3.org/TR/SVGMobile/
• Web applications developed according to the AJAX development principles are supported. The XMLHTTPRequest standard which is used for AJAX can be found at http://www.w3.org/TR/XMLHttpRequest/
Limitations
Font limitations The phones contain one proportional sans-serif font. In most phones the sans-serif font is scalable to any font size. Bold, Italic, Underlined and Strikeout font styles are supported.
Note: In the W350, W380, Z310 and Z555 series, font sizes are limited. For Western languages three font sizes are available, “small”, “medium” and “large”. For Chinese and Japanese there are two sizes; “medium” and “large” give the same font size in the browser.
Frames Frames are only supported in the 3.4 version of the browser. In the 3.3 version of the browser, HTML inside the
11 March 2009 Developers guidelines | NF3 Web browser
HTML support
This section lists all HTML elements and related attributes supported by the Sony Ericsson phones that use the NetFront browser, versions 3.3 and 3.4. Some HTML elements that are not supported are also included in the list. The list only contains supported attributes.
For detailed information about the HTML syntax, permitted attribute values, and so on, see information found on www.w3.org.
Content vs design
Separation between the content (text, images, table, forms, and so on) and presentation (colour, fonts, borders, layout, and so on) is a fundamental design rule on the Web. On a Web page, content is described by the markup language HTML while presentation is described by the style sheet language CSS.
The same HTML document can be presented in different ways by adding different style sheets, and the same style sheet can be used for many documents. Both HTML and CSS are de facto Web standards, supported by all major Web browsers on the market, and are familiar to Web developers.
Common attributes
Some attributes are defined for a large number of elements and will be listed as “Common attributes” below. Although the common attributes are defined for many elements, they may not always be useful to all of them. For example, applying a style rule to the
element is not useful, because the head will not be displayed.The common attributes are:
• class • dir •id • title • lang • style • onkeypress • onkeydown • onkeyup
Note: onkeypress, onkeydown and onkeyup are supported for all elements. However, they are normally only used on selectable objects like the link, form elements, and the element.
12 March 2009 Developers guidelines | NF3 Web browser
Note: The browser supports the text direction attribute with values dir="ltr" and dir="rtl". In order to display different languages used on the same page (nested) the browser uses a special algorithm called "The Bidirectional Algorithm" provided by Unicode (http://unicode.org/reports/tr9/).
Mouse events
The following mouse events are supported in phones implementing the mouse cursor interface in the browser. In all other phones these events are not supported. In the tables below, “Mouse events” in the attribute column indicates that the following events are supported:
• ondblclick • onmousedown • onmouseout • onmouseup • onmouseover • onmousemove
The following mouse event is not supported in any Sony Ericsson phone.
• onmousewheel
Elements and attributes
Element
Common attributes
Mouse events Only in phones with mouse cursor support
accesskey After the execution, an event handler of control is initialised
coords
href NF3 supports jumping via fragment identifier only for and elements
name
onblur
onfocus
shape Only rectangle focus frames are supported
tabindex
target
13 March 2009 Developers guidelines | NF3 Web browser
Element
attribute Remarks
Common attributes
Mouse events Only in phones with mouse cursor support
Common attributes
Mouse events Only in phones with mouse cursor support
Common attributes
Mouse events Only in phones with mouse cursor support
Common attributes
Mouse events Only in phones with mouse cursor support
accesskey After the execution, an event handler of control is initialised
coords
href
nohref
onblur
onclick Triggered after text has been entered in the control
onfocus
shape Only rectangle focus frames are supported
tabindex
target
Common attributes
Mouse events Only in phones with mouse cursor support
href
target
14 March 2009 Developers guidelines | NF3 Web browser
Element
attribute Remarks
Common attributes
color
size
Common attributes
balance
loop
src
volume
Common attributes
Mouse events Only in phones with mouse cursor support
Common attributes
Mouse events Only in phones with mouse cursor support
cite
Common attributes
Mouse events Only in phones with mouse cursor support
alink
background
bgcolor
bgproperties
bottommargin
leftmargin
link
15 March 2009 Developers guidelines | NF3 Web browser
Element
attribute Remarks
marginheight
marginwidth
onload
onunload
rightmargin
scroll
text
topmargin
vlink
Common attributes
clear
Common attributes
Mouse events Only in phones with mouse cursor support
accesskey After the execution, an event handler of control is initialised
disabled Depending on graphic system
name
onblur
onclick Mapped to the Selection key
onfocus
tabindex
type
value
Common attributes
Mouse events Only in phones with mouse cursor support
16 March 2009 Developers guidelines | NF3 Web browser
Element
attribute Remarks
align If left is specified, the vertical coordinate is the same as top and the horisontal coordinate is left-aligned in the table width.
If right is specified, the vertical coordinate is the same as top and the horisontal coordinate is right-aligned in the table width
Common attributes
Mouse events Only in phones with mouse cursor support
Common attributes
Mouse events Only in phones with mouse cursor support
Common attributes
Mouse events Only in phones with mouse cursor support
bgcolor
span
valign
width
Common attributes
Mouse events Only in phones with mouse cursor support
bgcolor
span
valign
width
Common attributes
Mouse events Only in phones with mouse cursor support
17 March 2009 Developers guidelines | NF3 Web browser
Element
attribute Remarks
Common attributes
Mouse events Only in phones with mouse cursor support
cite There is no visual effect even if the attribute value is specified
Common attributes
Mouse events Only in phones with mouse cursor support
Common attributes
Mouse events Only in phones with mouse cursor support
Common attributes
Mouse events Only in phones with mouse cursor support
align "justify" is not supported for this attribute
Common attributes
Mouse events Only in phones with mouse cursor support
Common attributes
Mouse events Only in phones with mouse cursor support
align Ver 3.4 only
alt Ver 3.4 only. Whether it affects behaviour of the attribute value depends on the plugin implementation
border Ver 3.4 only
code Ver 3.4 only. Whether it affects behaviour of the attribute value depends on the plugin implementation
codebase Ver 3.4 only. Whether it affects behaviour of the attribute value depends on the plugin implementation
18 March 2009 Developers guidelines | NF3 Web browser
Element
attribute Remarks
frameborder Ver 3.4 only
height
hidden
hspace
name
palette Ver 3.4 only. Whether it affects behaviour of the attribute value depends on the plugin implementation
pluginspage Ver 3.4 only. Whether it affects behaviour of the attribute value depends on the plugin implementation
pluginurl Ver 3.4 only. Whether it affects behaviour of the attribute value depends on the plugin implementation
src
type
units Ver 3.4 only. Whether it affects behaviour of the attribute value depends on the plugin implementation
vspace
width
Common attributes
Mouse events Only in phones with mouse cursor support