1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect WP site if internet connection?

Discussion in 'Blogging' started by arhan, Apr 6, 2011.

  1. arhan

    arhan Registered Member

    Joined:
    Nov 21, 2009
    Messages:
    98
    Likes Received:
    53
    As we all know that Gmail created pop up message if slow connection ( i.e switch to Basic HTML). I'm afraid if my visitor will go to my site, then their connection is slow.

    My question is, can my Wordpress site get basic html OR redirect to mobile version JUST if visitor connection slow?

    Any help appreciated, thanks in advance :)
     
  2. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    Mobile redirect is easy - you just check the surfer's user agent against a list of common mobile browser user agents and redirect to the mobile version if the surfer is on their phone.

    Redirecting according to connection speed is a tricky one however.
     
    • Thanks Thanks x 1
  3. arhan

    arhan Registered Member

    Joined:
    Nov 21, 2009
    Messages:
    98
    Likes Received:
    53
    I use MobilePress plugin for my Wordpress site, which it's will automatically redirect to http://www.mysite.com/?mobile if anyone use mobile device like PDA, iPhone, Opera Mini, etc.

    But in this plugin, there is no setting to redirect if the connection is slow.

    My point is, if surfer in slow connection when accessing mysite.com, and in 30 seconds not to finish loading, so I want to immediately redirect to http://www.mysite.com/?mobile

    If this could be? What code can I add on my site?
     
  4. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    OK... The way to do it is to put an iframe on your page, and in the iframe you put a little javascript that measures download speed. If the download speed is below a certain speed, you launch a javascript redirect (from that iframe) with target=parent, so you redirect the main parent page to your low speed version.

    Some resources:
    http://www.stoimen.com/blog/2009/07...wser-speed-and-load-the-slow-connection-site/
    http://ditio.net/2008/08/06/detect-connection-speed-with-javascript/
    http://bytes.com/topic/php/answers/11523-detect-connection-speed
    http://www.ehow.com/how_5804819_detect-connection-speed-javascript.html
     
    • Thanks Thanks x 2
  5. arhan

    arhan Registered Member

    Joined:
    Nov 21, 2009
    Messages:
    98
    Likes Received:
    53
    OK, thanks for fast respon. I will try these resources :)
     
  6. jbtalk2me

    jbtalk2me Registered Member

    Joined:
    Jan 9, 2009
    Messages:
    54
    Likes Received:
    479
    Good Tip!
     
  7. kedarl

    kedarl Newbie

    Joined:
    Oct 2, 2012
    Messages:
    1
    Likes Received:
    0
    Home Page:
    How to detect Slow Internet Speed. Anyone please tell me script that detect your slow internet speed.Is there script if any?
    Thnx in advance