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.
Archived Comments
@ 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!
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?
@Michael - good idea. I removed them.
@Raul - heh I love the design. :)
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?
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".
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.
Gotcha. Very cool stuff.
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...
Doesn't seem to work with the iPod Touch browser.
Jamie, what part doesn't work? The auto detection, or the layout?
The autodetect. I meant to check the user agent on the Touch but got distracted. I believe you have one too though. . .
Turns out the Touch browser uses iPod instead of iPhone.
So I could just add a check for ipod. Think I should?
Absolutely. Google was upsetting a lot of us Touch owners. They took a long time to update the Google Reader detection code.
I'll try this out on my BB 8830 and see how it works.
I've added an ipod check.
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.
Can you please find out your user agent? I just double checked and it works fine for me.
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
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/...
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.
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.
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.)
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