×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Starting out in Converting websites to Mobile Phone use.

Starting out in Converting websites to Mobile Phone use.

Starting out in Converting websites to Mobile Phone use.

(OP)
As an amateur, I have set up a few small websites over the years, with the use of a now out-dated Dreamweaver 2004MX and some PHP/MYSQL. It would be great to make one or two of the sites "mobile-friendly", and am seeking advice on how to tackle this. In the past I have found text-books on PHP, HTML etc. to be helpful. Are there any books on converting sites to mobile-use which you could recommend? Or perhaps there are particularly clear and helpful websites that you know of that might help.

RE: Starting out in Converting websites to Mobile Phone use.

"mobile use" meaning??

Because I don't know of a mobile operating systems that supports running PHP on it.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: Starting out in Converting websites to Mobile Phone use.

(OP)
Thanks for the question ChrisHirst.
What I mean is sorting out websites that operate ok on a desktop browser, but either don't fully operate, or are awkward to read and navigate on a an iphone or other mobile phone.
and example of mine is www.dvw.org.uk where the php that I have used still does the job when viewed on my iphone, but the layout is not really appropriate for that media.
Does that make sense?

RE: Starting out in Converting websites to Mobile Phone use.

There are two ways to approach this problem:

1. Browser detection
2. Responsive design

Browser detection usually works by analyzing the browsers user agent (either server-side in PHP or via Javascript) and then redirecting to a mobile friendly version of the site (usually at a subdomain, like your instance m.dvw.org.uk). If you were using PHP to do the detection you could internally route and output the design without the redirect keeping the URL the same for both sites (keeping the URL the same is a plus).

The downside to browser detection is that it is not always accurate, especially if the user disables sending the user agent string to the server.

Responsive design involves crafting your HTML and CSS to change for different devices (usually using screen sizes). This has the plus of keeping the URL the same, and not relying on the user agent string - only the capabilities of the browser. These type of website designs can be more complicated to design, as you have to make the same markup adapt to each device.

As of right now there isn't really a good way to handle responsive images. Images that work good on a desktop, might be to big for a mobile site and using a smaller image could save precious network bandwidth for mobile users - but that smaller image wouldn't work good on the desktop. Having a separate site via browser detection can handle this fine, by just outputting a different image. There are some tricks for responsive design, and it looks like there is a specification in the works, but don't expect broad browser support for a while.

I would really look into the responsive design strategy, of which you can find numerous articles online. Responsive design has the added benefit of having the website work well on the desktop even if the user re-sizes the browser.

RE: Starting out in Converting websites to Mobile Phone use.

Right! So being in the PHP forum was a bit of a red herring then, as you really need forum215: HTML, XHTML & CSS. PHP is server side so doesn't actually 'know' what it is being 'used on'.


The answer by the way is "CSS media queries"

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: Starting out in Converting websites to Mobile Phone use.

I agree with Chris. While you can detect the user agent and output a site accordingly. Its usually not all that accurate, and you would have to contend with the thousands of different user agents out there to determine the type of browser being used, which tends to be very inconvenient.

The "easier" way of tackling this is using a responsive design via media queries. Most newer devices support this just fine and will honor the CSS in the media queries.

You can even specify different images of different sizes through the media queries, so you deliver smaller images to mobile devices and larger more HD images to desktop devices.

There are in fact many many books about this already.
http://www.awwwards.com/7-essential-books-on-respo...

This of course falls really far away from PHP since its all in the HTML and CSS portion of the site.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close