Twitter: raymondcamden


Address: Lafayette, LA, USA

Slides, code from my jQuery Mobile presentation

04-16-2011 7,573 views Mobile, jQuery, JavaScript 21 Comments

Below you can find the slides and code from my jQuery presentation. The code is included as an attachment (click the Menu button in the slide display).

For the person who asked about the mobile detection, the site I could not remember was http://detectmobilebrowser.com/. Thank you @itsMeAra.

Also - if you attended, please rate me here: http://speakerrate.com/talks/7214

21 Comments

  • Commented on 04-16-2011 at 6:20 PM
    Ray the only problem I have with the jQuery detection or any JS detection, is that on my phone a Samsung Galaxy S. Both your site and any site that has begun using this detection from jQuery, means I actually have to kill the internet browser in my phone. I gave up trying to get you to fix this on your blog over 8 months ago, and find that it is easy for me to just filter sites out that use this jQuery method.

    The reason being is that each time I hit my back button, the one that navigates app screens to the previous screen. Reloads the jQuery detection and redirects back to the mobile version, that means that I can never leave the browser in the manner that one should be able too.

    I highly suggest that if anyone is going to be looking at Mobile Detection for their websites in the future, that you have a good look at the project that is desinged for this and that is the OWASPI project WURFL at http://wurfl.sourceforge.net/

    Sorry to be so negative, but thats the reality of this.
  • Commented on 04-16-2011 at 6:48 PM
    The detection I'm using has nothing to do with jQuery. You know that, right? It's pure server side code using the item listed above.

    My site uses a session cookie when you leave the mobile site - but ONLY sets it if you click the exit mobile button the bottom right. Don't hit back. Can you just try that?
  • Commented on 04-16-2011 at 7:17 PM
    Will chat with you off list.
  • Commented on 04-16-2011 at 7:44 PM
    I should say that I assumed it was jQuery because the page loads, and then is redirected to the mobile site. Which indicated some JavaScript redirection was happening, and as you used jQuery, I assumed that this was happening by jQuery.
  • Isaac Sunkes #
    Commented on 04-17-2011 at 3:35 PM
    Seems you could always detect a mobile browser with the "cgi.http_user_agent" string and then use CFlocation to send the user to a mobile version of the application. I don't mean on every page request either, just send them to a jQuery mobile version on the first request.

    I have been using jQuery mobile to build clients mobile versions of their current web applications and so far they love it.

    @Andrew: jQuery mobile doesn't crash our companies Samsung Galaxy S browser, and the user can leave the page whenever they want?
  • Commented on 04-17-2011 at 4:45 PM
    After chatting with Ray off list, it wasnt jQuery which I mentioned above that I did assume it was it. The problem is ColdFusion and the fact that CFLocation is used, when doing it this way the mobile browser will end up in and endless loop when trying to go backwards.

    It was wrong to make the intial assumption I did make.
  • Isaac Sunkes #
    Commented on 04-17-2011 at 5:36 PM
    What it wrong with cflocation, I have experienced no endless loops? You mention a problem with cflocation yet offer no alternative solution? Correct me if I am wrong but doesn't cflocation keep the original landing page's HTTP_REFERER?
  • Commented on 04-17-2011 at 6:05 PM
    I think ou are getting a little confused there, refferer has nothing to do with previous page URL. When you hit a page URL the browser has already began loading that URL, with a cflocation you are forcing another URL to then be loaded into the browser. You can test this very easily by creating a page that loads anothe URL, and try to hit the back button. You will find that the browser has detected that you are going to a page that has been redirected, and redirects you back to the same page you just came from.

    That is just common knowledge and behaviour of a browser mechanics.
  • Isaac Sunkes #
    Commented on 04-17-2011 at 6:08 PM
    @Andrew: So if is not the way you think it should be done (which is what I think you are getting at) what is your solution to the problem?
  • Commented on 04-17-2011 at 6:17 PM
    It will depend on you and your application, but as I work with MVC type frameworks this is very easy to overcome with no extra effort on my part.

    But a simple cfinlclude to load that data would work fine.

    Look I have to make this very clear, this is not a dig at Ray or jQuery but something that I have noticed overtime. And there are a couple of high profile news sites that detect that you are browsing and redirect you to a new domain usual starting with m so if the domain was www.abc.com it would redirecto you to m.abc.com and when you try to hit the back button, you are taken back to the www.abc.com site which then redirects you back to m.abc.com

    I am not telling anyone how to do this, or that they shouldn't do this. What I am saying is that you really should be aware that on a mobil device it is highly possible that this will frustrate the user to the website, and I have stopped browsing these sites because I was getting sick and tired of having to kill the task on the mobile each and everytime.

    I guess at the end of the day, you are free to do what you please. but I just want it be known that this can be a problem that noone might have ever considered.
  • Topper Harley #
    Commented on 04-17-2011 at 9:54 PM
    Silly rookies! No sense arguing...
  • Commented on 04-17-2011 at 10:04 PM
    Thanks for the helpful comment there Topper. As helpful as your last one. Are you trying to troll here or do you have a point?
  • Commented on 05-02-2011 at 11:21 AM
    Hey, thx for all. Can you share the source code of your demos?

    Thx a lot =D
  • Commented on 05-02-2011 at 11:33 AM
    I did. :) Click the Menu button on the embedded slide viewer above.
  • Commented on 05-02-2011 at 11:36 AM
    Lindo!!! - BTF hehe, i never see this slide viewer before =D Thx a lot =D
  • Commented on 05-02-2011 at 11:38 AM
    Slidesix.com - darn good site for hosting presos - especially for developers. Also built by a friend of mine so I may be biased.
  • Rick Faircloth #
    Commented on 05-10-2011 at 11:23 AM
    Hey, Ray... I'm trying to get the code, etc., from your jQuery Mobile presentation. I see where it says I should click the menu button in the slideshow to get the attachments, but the slideshow area now states that there are no slides, and the menu button doesn't respond.

    Is there another way to get the source code/documents?
  • Commented on 05-10-2011 at 11:25 AM
    This looks to be an issue with SlideSix. Try again in a while. If you want the slides/code now, ping me via Twitter/IM with your email and I can send you a zip.
  • Commented on 05-10-2011 at 11:27 AM
    Fixed. Todd Sharp is Uber Man.
  • Rick Faircloth #
    Commented on 05-10-2011 at 11:28 AM
    Oh, wait! Another refresh (which I had tried several times...) and the presentation came to life! :o)
  • Rick Faircloth #
    Commented on 05-10-2011 at 11:28 AM
    Wow! Fast fix! Impressive! ;o)

Post Reply

Please refrain from posting large blocks of code as a comment. Use Pastebin or Gists instead. Text wrapped in asterisks (*) will be bold and text wrapped in underscores (_) will be italicized.

Leave this field empty