iPhone version of ColdFusionBloggers.org

This post is more than 2 years old.

The ColdFusionBloggers aggregator now automatically detects the iPhone browser and sends it to a special URL:

http://www.coldfusionbloggers.org/iphone.cfm

This was done with some rather trivial code:

<!--- detect iphone ---> <cfif findNoCase("iphone", cgi.http_user_agent)> <cflocation url="iphone.cfm" addToken="false"> </cfif>

Let me know if this breaks any non-iPhone users. Or - if you use some other mobile browser, feel free to add this to your bookmarks.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Michael posted on 12/12/2007 at 3:07 AM

@ Ray, you may want to make your mobile page even "lighter". How much of the YUI do you really need. Tooltips are pretty cool but at what cost?

I know CFBloggers was made to highlight CF8 and all of it's ajax goodness so this comment maybe out of line, but those of us who hate to see the data section of a wireless bill... it would help to stop panic attacks, or a least limit their duration!

Comment 2 by Raul Riera posted on 12/12/2007 at 3:14 AM

Not the prettiest WebApp :P hehe. But then again.. there is so much text around that no "pretty design" could be apply to it.

Maybe using the drill down template some1 posted on your review of the iphone/ipod?

Comment 3 by Raymond Camden posted on 12/12/2007 at 3:15 AM

@Michael - good idea. I removed them.

@Raul - heh I love the design. :)

Comment 4 by Ben Nadel posted on 12/12/2007 at 3:39 AM

Cool stuff. I don't have an iPhone, but I am curious about what this is:

<meta
name = "format-detection"
content = "telephone=no">

What's the two second run-down?

Comment 5 by Jonas posted on 12/12/2007 at 4:00 AM

Great - saved me from looking around for the "rather trivial solution", as you say, nonetheless worth to blog -I probably won't use it for another five weeks, but we'll launch a new site with a dedicated iPhone section in about two months, so this is really helpful- thanks again. The Apple iPhone is a fantastic device I think, even SAP apparently announced it would port some applications to it as it "is so easy to integrate into corporate environments".

Comment 6 by raymond camden posted on 12/12/2007 at 4:02 AM

it tells the iPhone not to render phone numbers as clickable links. The dates were confusing the iPhone. FYI I'm writing this on my iphone.

Comment 7 by Ben Nadel posted on 12/12/2007 at 4:05 AM

Gotcha. Very cool stuff.

Comment 8 by NateW posted on 12/12/2007 at 4:07 AM

Very nice! congrats to the team.

I think that nobosh Answers still holds the Best Coldfusion iPhone Web App Award...

http://answers.nobosh.com/i...

Comment 9 by Jamie posted on 12/12/2007 at 6:35 AM

Doesn't seem to work with the iPod Touch browser.

Comment 10 by Raymond Camden posted on 12/12/2007 at 6:50 AM

Jamie, what part doesn't work? The auto detection, or the layout?

Comment 11 by Jamie posted on 12/12/2007 at 7:32 AM

The autodetect. I meant to check the user agent on the Touch but got distracted. I believe you have one too though. . .

Comment 12 by Jamie posted on 12/12/2007 at 7:36 AM

Turns out the Touch browser uses iPod instead of iPhone.

Comment 13 by Raymond Camden posted on 12/12/2007 at 7:41 AM

So I could just add a check for ipod. Think I should?

Comment 14 by Jamie posted on 12/12/2007 at 8:01 AM

Absolutely. Google was upsetting a lot of us Touch owners. They took a long time to update the Google Reader detection code.

Comment 15 by Lola LB posted on 12/12/2007 at 6:12 PM

I'll try this out on my BB 8830 and see how it works.

Comment 16 by Raymond Camden posted on 12/12/2007 at 7:11 PM

I've added an ipod check.

Comment 17 by thiman posted on 12/12/2007 at 9:48 PM

Just tried on my iPhone. Very nice. Auto-redirect to iphone.cfm didn't work, but typing in gives me the nicely phone-formatted homepage.

Comment 18 by Raymond Camden posted on 12/12/2007 at 9:52 PM

Can you please find out your user agent? I just double checked and it works fine for me.

Comment 19 by Chris Bowyer posted on 5/15/2011 at 11:30 AM

Worked for me. Thanks! Gee. It's getting to the point, that to be a web developer, you need an iPhone and Dreamweaver/CFBuilder. PS. Couldn't find an emulator to try the script out. Maybe there's no such thing. Does anyone know if there is? Had to contact the client to get him to try it out, and I don't like having to do things like that. Just doesn't make me feel very professional

Comment 20 by Chris Bowyer posted on 5/15/2011 at 4:23 PM

If it's of interest to anyone. I have since found this Firefox add-on that allows you to switch user agents, including to iPhone 3.0 - https://addons.mozilla.org/...

Comment 21 by Raymond Camden posted on 5/16/2011 at 10:37 PM

Chris, I'd definitely say that if you are a "serious" about mobile development then you at least need one device. I won't say you need DW - but it is freaking amazing how much it helps. But at minimum you want at least one piece of hardware. I've currently got 3 tablets and a few phones, but I only test on my main phone. My wife has an iPhone I could use in a pinch, but eventually I probably need to pick up a iPod Touch and an iPad.

Comment 22 by Lola LB posted on 5/16/2011 at 11:11 PM

Ray is right - you'll need at least one hardware device, as current as at least one year before today's date, in order to be able to test the mobile version of your site/app. I'm working on a website and we're planning on having a mobile version, so we'll eventually need to update our smartphones, maybe even get a tablet. My BB8830 just ain't gonna cut it anymore, I'm afraid.

Comment 23 by Raymond Camden posted on 5/16/2011 at 11:12 PM

Don't forget - and this makes it a bit nicer - that if you are an independent consultant (or earn side money), you can write it off as a business expense. (Note that I am not a professional tax person, so take with grain of salt.)

Comment 24 by Chris Bowyer posted on 5/17/2011 at 8:01 AM

Luckily I bought the Web Premium Creative Suite a couple of years ago, but being partially disabled and working from home, money is tight, so I have to put up with my aged Motorola RAZR V3X, aging Creative Suite 4, and still can't justify the expense of ColdFusion Builder, although I would love to get a copy (actually, I have just downloaded the latest version, so I can at least use the free Express Edition after the trial). I'm not really into mobile development (yet), but needed to provide an alternative to Flash the other day, hence my look into user agents