![]() |
Mobile redirection code Hey, I'm trying to improve on my mobile redirection code.. This is what I have so far.. Code: <script>It seems there isn't one definitive way to do this :rolleyes: |
Re: Mobile redirection code This one is a very simple one: Code: <script type="text/javascript"> |
Re: Mobile redirection code I can test the redirection right now, as I have my phone by the PC. What website link should I look at. Brian |
Re: Mobile redirection code Extremely simple! This is another version of the first one I posted.. Code: <script>I'm not 100% on this second one so stick with the first one for now. Quote:
I'm currently testing a PHP version.. great for sites based on Wordpress as the PHP runs without any issues and you can simply insert it into header.php and it will forward every single page. |
Re: Mobile redirection code The next piece of the puzzle would be mobile templates. Brian |
Re: Mobile redirection code Quote:
Quote:
|
Re: Mobile redirection code Looks like I'll stick with my standard JavaScript code then.. Did some research and the amount of people that don't have JavaScript enabled is extremely small.. this is some data I found online from a site that gets 30,000 visitor per month.. JS 1.3 - 94.23% JS 1.2 - 5.61% JS 1.1 - < .00% Other versions - .04 No JS - .12% :) |
Re: Mobile redirection code Nice! I was about to purchase a full mobile WSO just for that script *lazy*. Thanks for sharing. Do you guys know of any good resources for templates? |
Re: Mobile redirection code I would use a redirect script based simply on browser width, because if your script is based on user agent, then you're going to have to constantly tweak it whenever a new mobile phone or OS comes out. But instead of using a width of < 800, I would use < 1024. Reason being is that there are more than a few smartphones out now that have screen widths greater than 800 (and no doubt many more to come). Yet virtually no one on a regular computer or laptop uses a screen resolution of less than 1024x720 anymore --> Browser Display Statistics Heck, even my tiny netbook has a screen width of 1024 px. |
Re: Mobile redirection code Quote:
|
Re: Mobile redirection code That's like saying you should forward laptop users that are using 3G users to a mobile site. I'm using a 3G connection on a laptop now actually - and if I was forwarded to a mobile site I'd be annoyed. The main problem is the mobile web is comparatively new and making these decisions is always going to annoy some users. Perhaps someone needs to do a big survey.. but for now I'm forwarding iPad users to the fully functional site. Quote:
|
Re: Mobile redirection code Quote:
Neil B :cool: |
Re: Mobile redirection code Quote:
We don't use user agent detection just for redirection purposes like most other people do - we take user agent detection to the next level and use it to deploy and format the correct content to the end users device, as already pointed out just on this thread alone there isn't a one solution fits all, but using php user agent detection like we do gets you very close and certainly gives you the most flexibility if deployed correctly. Unlike everyone else we use a unique approach that filters the user agent data - where possible we look at the device manufacturer, os, phone model and browser type and filter the devices categorizing them into smartphones, non smartphones, non mobile devices and tablets which allows us to deploy the most compatible content for the device accessing our sites - our approach was developed specifically to be super light weight and work at lightening speed so there is no problem with performance. We did use a simplified version of this approach in one of our recent wordpress mobile redirect plugins and are currently testing our approach with a full on mobile wordpress theme. You might ask why go to to all this trouble... Let's just say mobile web development isn't something i just started doing in the past 6 months, I have been working with mobile content passionately for more than 8yrs now - I love mobile! Lol Just like "I got it" and understood the potential of mobile back then it's just taken time for technology to catch up and every day people "to get it" more importantly corporate is now starting "to get it" too, this mobile platform is just going to get bigger and we are embracing it now just like some warriors are improving their own scripts or mobile platforms/services for better functionality and service its because like them we see the bigger picture... |
Re: Mobile redirection code Thanks for that post, Do you do any teaching or have a small course. With 8 years I'm sure you have some good tricks. Tom |
Re: Mobile redirection code Quote:
Doing training is something i have considered, unfortunately time is really the restricting factor. I am currently rolling out products that will enable people to hit the ground running with mobile. All of the products we launch are based around my own experience and vision towards deploying mobile which will hopefully help people avoid many of the pitfalls i have had to already work around. I always encourage people to think out of the box and perhaps my solutions are not for everyone but at least it can perhaps give people a much wider insight to mobile and avoid some of the pitfalls i have come across in the past. Also with better understanding of where i am coming from with my approach it may stop people thinking i am crazy but instead give them a better understanding why i feel so passionate about what i do and perhaps give them reason to be inspired enough to get involved and share in the experience! :) |
Re: Mobile redirection code I've gone to sites on my iPhone that have given me a pop-up/pop-out message saying "It appears you're on a mobile device, would you like to go to our mobile site?" How do I do this? |
Re: Mobile redirection code Quote:
i have stopped deploying that on new sites for the interim period as i have a much better approach that uses cookies to stop it continually popping up if you cancel |
| All times are GMT -6. The time now is 07:13 PM. |