SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    alaska
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Mobile Design - Unsupported Content Type??

    Hi there,

    I've run into a hitch in my 1st mobile version of a website - an unsupported content type error message displayed by no-frills cell phones, which means that users of those phones can't enter the site. I've tested everything that I can think of including removing almost all content, trying different doc and MIME types, & taking out CSS and meta information from the header but nothing seems to work. The lack of information on the web doesn't help either, or the fact that I've never done this before.

    I use PHP to detect whether the user is using a mobile device, then wrap the page in header and footer includes appropriate for the mobile version. Here's the site:

    http://dev.cvtc.org/mobile.php

    Does anyone have any suggestions or know what content is unsupported by unsophisticated mobile devices? Any suggestions would be very welcome!

    Thanks!
    Heidi J. Weiland
    Web Developer
    Sound Web Solutions, LLC
    www.soundwebsolutions.net

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Are these WAP browsers? text/html may be the content-type they don't understand, it wouldn't matter what you put in the page. WAP is XML, not HTML.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    alaska
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the link, very informative. I tried changing my header information to the following, but it didn't resolve the problem:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
    "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

    <html>
    <head>
    <meta http-equiv="Content-Type" content="application/xhtml+xml" />

    The issue seems to be with Openwave... Is there some kind of code specific to Openwave that should be included?
    Heidi J. Weiland
    Web Developer
    Sound Web Solutions, LLC
    www.soundwebsolutions.net

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    As I said, nothing in the content of your page would matter if that's the problem. Your web server, Apache, sends the content-type header before any of the page content. The modification you'd need would be at the server level. But I have not developed a WAP site so I don't know which content type to advise you to send.

    Content-type is an HTTP header, part of the HTTP protocol, not part of the HTML or XML document.

  5. #5
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Firstly, if you want to produce a mobile version of a website in WML, learn the language, it is NOT HTML therefore your head tags, META tags and everything else is pointless. Secondly if you want your website to work across multiple graphical mobile devices (that support HTML) you are going to have some major problems which include the following...

    • Most mobile devices will not recognise the XHTML mobile type.
    • Most mobile devices do not recognise or work with the mobile CSS media type.
    • Most mobile devices attempt to read html as html, and fail drastically.


    OpenWave is one of those renderers that has a lot of issues with working with HTML and does not use the WAP/WML protocol. Using PHP to detect a mobile device is a dangerous and fruitless experience, there are thousands of mobile devices which all call their browsers differently so your script will not detect even a small fraction of them correctly, more importantly the more modern browsers will tell your PHP script they are Firefox or IE or safari (they pass headers which say their a graphical browser) which your script will miss.

    The closest way I have seen to making HTML work for mobile devices is the following article but even that is not close to perfect...

    http://www.alistapart.com/articles/r...bilestylesheet


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •