Copyright © 2008 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This document is the Guidelines referred to in the Charter of the W3C Mobile Web Initiative Best Practices Working Group Content Transformation Task Force.
Its purpose is to provide guidance to implementors of components of the delivery context as to how to communicate their intentions and capabilities in respect of content transformation.
This document is an editors' copy that has no official standing.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
Publication as a Group Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document has been produced by the Content Transformation Task Force of the Mobile Web Best Practices Working Group as part of the Mobile Web Initiative . Please send comments on this document to the Working Group's public email list public-bpwg-ct@w3.org, a publicly archived mailing list .
This document was produced under the 5 February 2004 W3C Patent Policy . W3C maintains a public list of patent disclosures made in connection with this document; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) with respect to this specification must disclose the information in accordance with section 6 of the W3C Patent Policy.
1 Introduction
1.1 Purpose
1.2 Scope
1.3 Audience
2 Guidelines
2.1 Summary of Requirements
2.2 Objectives
2.3 Types of Proxy
2.4 Proxy States
2.5 Types of Transformation
2.6 Control by User and Client
2.7 Control by Server
3 Behavior of Components
3.1 Client Origination of Request
3.2 Proxy Receipt, Forwarding or response to a Request
3.3 Server Response to Proxy
3.4 Proxy Receipt and Forwarding of Response from Server
3.5 Proxy Response to Client
3.6 Client Action on Receipt of Response
3.7 Summary of Proposed Features
4 Use Case Analysis
5 Testing
6 Conformance
A Scope for Future Work (Non-Normative)
B References (Non-Normative)
C Acknowledgments (Non-Normative)
D To Do (Non-Normative)
This document establishes a framework to allow that to happen.
A more extensive discussion of the requirements for these guidelines is discussed in "Content Transformation Landscape" [CT-Landscape].
The needs of these actors are as follows:
The user agent needs to be able to tell the content transformation proxy [@@and the origin server]:
The content transformation proxy needs to be able to tell the origin server:
that some degree of content transformation (re-coding and reformatting) can be performed;
that content transformation will be carried out unless instructed not to;
that content is being requested on behalf of something else [@@?? and what that something else is];
that the request headers have been altered (e.g. additional content types inserted).
The origin server needs to be able to tell the content transformation proxy:
The content transformation proxy needs to be able to tell the client browser:
The content transformation proxy needs to be able to interact with the user:
A transforming proxy is viewed as being in one of two states in respect to a client and a server. In the active state it may transform content and manipulate HTTP headers. In the passive state it behaves like a transparent proxy and behaves as though a Cache-Control: no-transform
directive were present on every request and every response, with the possible exception that - only with the
consent of both the user and the content provider - content which it has been determined would cause serious mis-operation of the client, such as causing it to crash, may be minimally transformed to prevent that mis-operation.
This must steer clear of recommending a deviation from the HTTP spec which I don't think is acceptable. However there are parallels with the operation of e.g. child protection mechanisms?
Note:
In practice, the passive state may be achieved by the proxy being by-passed.
If the request contains a Cache-Control: no-transform directive [@@or any of the other directives specified in previous section] the proxy must forward the request unaltered to the server, other than to comply with transparent HTTP behavior and in particular to add a Via
HTTP header.
The proxy must (in accordance with compliance to RFC 2616) include a Via
HTTP header indicating its presence, and must indicate its capabilities using the [@@transforming-proxy-capability] mechanism.
If there are no [@@ transformation related directives] present in the request from the client, and there is no indication from a downstream proxy that it intends to transform [@@ see I will transform below] the proxy should analyze whether it intends to offer transformation services by referring to any administrative arrangements that are in place with the user of the client, or the server, and any a priori knowledge it has of client capabilities [@@ from a DDR and so on]. Knowing that the client has available a linearization or zoom capability and/or supports a broad range of content formats the proxy should not offer to recode content.
If as a result of this deliberation it intends to (restructure / reformat / compress) the proxy must indicate this by including a [@@@ I will transform (restructure / reformat / compress)] - [@@ and even if it doesn't it may indicate its potential for restructuring or recoding or compressing content [@@by means of ...].
Proxies must not intervene in HTTPS requests and should not intervene in methods other than [@@we have an open question here as to which methods are applicable].
A proxy should not alter HTTP requests unless not doing so would result in the users request being rejected by the origin server (this includes HTTP 406 status as well as HTTP 200 status, saying that the request cannot be handled - e.g. "Your browser is not supported").
Vary headers in 406 response - restrict to the one(s) that have caused the 406.
If the response includes a Cache-Control: no-transform directive that is not modified by [@@ other directives on recoding] then the response must be forwarded to the client unaltered other than in the respects noted for transparent operation of HTTP proxies as specified in RFC2616, and in particular the addition of a Via
HTTP header [@@which includes, or is in addition to a [@@transforming-proxy-capability] ...].
In the absence of a Vary or no-transform directive the proxy should apply heuristics to the content to determine whether it is appropriate to restructure or recode it (in the presence of such directives, heuristics should not be used.)
The server has previously shown that it is contextually aware, even if the present response does not indicate this - modified by a need for the proxy to be aware that the server has changed its behavior and is no longer aware in that way
the content-type is known to be specific to the device or class of device e.g. application/vnd.wap.xhtml+xml
examination of the content reveals that it is of a specific type appropriate to the device or class of device e.g. DOCTYPE XHTML-MP or WBMP or [@@mobile video] [@@ note Sean's extensive list of heuristics that should be included as an informative example?]
The response is an HTML response and it includes <link> elements specifying alternatives according to media type [or that such links are included as HTTP headers] or that the content has a mobileOK label.
If the proxy alters the content then it must add a Warning: 214 Transformation Applied HTTP Header. [@@ should this be elaborated to say what kind of transformation?]
If the proxy has transformed (reformatted) the content but not rewritten https links it should annotate those links to indicate that transformation service is not available on them.
A proxy should strive for the best possible user experience that the client supports. It should only alter the format, layout, dimensions etc. to match the specific capabilities of the client. For example, when resizing images, they should only be reduced so that they are suitable for the specific client, and this should not be done on a generic basis.
In the passive mode (as well as in the active mode), if the proxy determines that the resource as currently represented is likely to cause serious mis-operation of the client then the proxy may transform the resource but only sufficiently to alter the specific aspect of the content that is likely to cause mis-operation. Proxies must not exhibit this behavior unless this has been specifically allowed by both the server and the user. [@@ either by persistent registration of preferences, or by use of the [@@correct dangerous content] directive.]
The editors acknowledge contributions of various kinds from members of the MWI BPWG Content Transformation Task Force.
The editor acknowledges significant written contributions from: