dotMobimobiThinkingmobiForgemobiReadyDeviceAtlasgoMobi

Posted by sucithra 3 years 1 week ago

pic
 sucithra
mobiForge Enthusiast
Posts: 13
Joined: 3 years ago
[offline]

hi,

I designed a mobile site..it display in the all the mobile in this url.(http://ready.mobi/)..but not in iphone ...(http://iphonetester.com/)

plz give any idea..

Thanks in advance....

Posted by ruadhan 3 years ago

pic
 ruadhan
dotMobi logo
Mobile Champion
Posts: 710
Joined: 5 years ago
[offline]

Please post the URL of your web page, or post the markup you are using. You have not provided enough information for us to help.

Ruadhan O'Donoghue
dotMobi

Posted by sucithra 3 years ago

pic
 sucithra
mobiForge Enthusiast
Posts: 13
Joined: 3 years ago
[offline]

Hi,

this is the url .

http://dev.dcalling.de/mobile

Thanks,

Posted by ruadhan 3 years ago

pic
 ruadhan
dotMobi logo
Mobile Champion
Posts: 710
Joined: 5 years ago
[offline]

Using the super "Live HTTP Headers" extension for Firefox, I see that your server is setting the Content-type HTTP header (MIME type) to "application/vnd.wap.xhtml+xml". Many desktop browsers will have a problem with this header value, and some will offer to download the page because they don't know what to do with it (e.g. Firefox & Chrome, IE7) and others (e.g. IE6) will display an error message, while Opera will happily display the page.

Most mobile browsers will probably handle it OK, and some mobile browsers won't display XHTML MP documents UNLESS you use this Content-type.

So, to your problem. The iPhone behaves like IE6 here, and just displays an error message.

There are a couple of alternatives that you can use:

(1) Set your Content-type header to "application/xhtml+xml". This is the MIME type for XHTML documents (and the preferred approach). This will fix your iPhone problem, but other browsers might still give you trouble (e.g. IE6 and some older Nokias for example)

(2) Set your Content-type header to "text/html". This is also acceptable, and will allow browsers which otherwise wouldn't render your page to render it.

If you wanted to be really clever, you could check the Accept header of the HTTP request to determine what Content type the client device will accept, and then dynamically set the Content type header.

Does this help?

Ruadhan O'Donoghue
dotMobi

Posted by sucithra 3 years ago

pic
 sucithra
mobiForge Enthusiast
Posts: 13
Joined: 3 years ago
[offline]

its very helpfull for me..

thank you verymuch.

Posted by andyyew 2 years ago

pic
 andyyew
mobiForge Newbie
Posts: 1
Joined: 3 years ago
[offline]

Can you post an example on how the Accept header could be checked to determine accepted content type?

Posted by archanasomesan 2 years ago

pic
 archanasomesan
mobiForge Newbie
Posts: 1
Joined: 2 years ago
[offline]

mobile web site is going to create with WML language, how to check the local wml page with mobiforge

Posted by ruadhan 2 years ago

pic
 ruadhan
dotMobi logo
Mobile Champion
Posts: 710
Joined: 5 years ago
[offline]

andyyew wrote:
Can you post an example on how the Accept header could be checked to determine accepted content type?

The accept header of a basic mobile phone (the DDC in fact) might look something like:

application/xhtml+xml,text/html;q=0.1,application/vnd.wap.xhtml+xml;q=0.1,text/css,image/jpeg,image/gif

If we were to parse this header we would see that the device will accept application/xhtml+xml. So we can then set the Content-type header of our server response to this value.

In PHP, you can access the accept header:

$_SERVER["HTTP_ACCEPT"]

Then it is simple string parsing to find which types appear in the header. Here we look for application/xhtml+xml and if we don't find it, we fall back to text/html, which as mentioned in a previous comment is also acceptable:

$mime_type = (stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) ? "application/xhtml+xml" : "text/html";

Then, to set the content type header in your application you could use something like:

header("Content-type: " . $mime_type);
Ruadhan O'Donoghue
dotMobi

Posted by alo.jacko 2 years ago

pic
 alo.jacko
mobiForge Newbie
Posts: 1
Joined: 2 years ago
[offline]

Marked! I will check it later!thanks a lot.:-)
simulation taux banque credit immobilier de France - Credit immobilier de France, simulation credit immobilier. Résultat mitigé pour le crédit immobilier de France.simulation taux banque credit immobilier de France

Posted by xiaopy12 1 week ago

pic
 xiaopy12
Mobile Champion
Posts: 582
Joined: 1 week ago
[offline]

Christian Louboutin Sale sdygery