Response from Game Server to Gadget Server
Note of content generation
- Game Server must return the content to each carrier based on the User Agent request header from the Gadget Server.
- You need to use the following character encode.
docomo
Shift-JIS
au
Shift-JIS
softbank
UTF-8
- You can not use the tags and attributes below.
- <script>
- <a href="mailto:">
- <a href="tel:">
- on attribute
- utn attribute
- lcs attribute
- You can not use i-appli, BREW application, the S application.
- For DoCoMo devices, the total file size of a screen including images and HTML must be 100K bytes or less according to the i-mode specification.
Screen Transitions
All links used in screen transitions within the content must pass through the Gadget server.
The Gadget server URL is as follows.
- Sandbox environment
http://sb.pf.mbga.jp/[Application ID]
- Production environment
http://pf.mbga.jp/[Application ID]
GET:
- Setting using an absolute path (http://...) (Example: When the application ID is "100001" in the Sandbox environment)
POST:
- Setting using an absolute path (http://...) (Example: When the application ID is "100001" in the Sandbox environment)
or
- Setting using an absolute path (http://...) (Example: When the application ID is "100001" in the Sandbox environmet)
- The url parameter must be URI-escaped.
- guid=ON is required for DoCoMo devices
- All other links are converted through an intermediate page by the Gadget server.
Displaying Images
Images can be displayed in the content by writing ordinary HTML. When an image is displayed on the user's mobile device, it is automatically changed to a Gadget server URL by the Gadget server.
Normally, an Authorization header is not appended to a request for an image file from the Gadget server to the game server. If you want to append an Authorization header to evaluate the validity of the request, include signed=1 in the query parameters.
Image files are cached as much as possible in the production and sandbox environment. If this causes problems, include nocache=1 in the query parameters. To update an image file that has been cached, either change the filename in the URL or assign a query parameter.
If you want to use a 1dot transparent image, you can use following image on our platform.
Displaying Flash Content
Flash content can be displayed by writing ordinary HTML, in a similar manner just like when displaying an image. Similarly, when flash content is displayed on the user's mobile device, it is automatically changed to a Gadget server URL by the Gadget server, and will be distributed to the user as a Gadget Server domain.
1. Interactive playback
2. Inline playback
Service Tag
Social features provided by the platform can be accessed by including special links within the HTML. For example, for the diary writing feature, if the reserved word diary:self is entered for the href attribute of the anchor tag, the Gadget server will replace it with a link to the platform's diary feature to implement the feature.
例
HTTP Response header that can be set
Following HTTP response headers are available. Response header other than below, can be removed by the Gadget server.
Redirect
- Location
Example)Location: http://example.com/path/to/redirect
Specify the URL directly to the game server in Location header. Cross-Origin Resource Sharing
- Access-Control-Allow-Origin
- Access-Control-Allow-Credentials
- Access-Control-Expose-Headers
- Access-Control-Max-Age
- Access-Control-Allow-Methods
- Access-Control-Allow-Headers
- Origin
- Access-Control-Request-Method
- Access-Control-Request-Headers
Refernce) - http://www.w3.org/TR/cors/
Revision History
- 04/25/2013
- Added "HTTP Response header that can be set"
- 03/15/2013
- Document migrated