Just wanted to find out if anyone on this forum know some codes that the html can automatically recongise that this website is viewing from iPhones and other such mobile phone internet viewing?
Or what is the appropiate codes to size it up to view properly as I am currently in the construction to build a mobile version website with my major project....
Any assistance would be appericated :)
Mobile version doing
Started by jclarke, Nov 22 2009 04:59 PM
5 replies to this topic
#1
Posted 22 November 2009 - 04:59 PM
|
|
|
#2
Posted 22 November 2009 - 08:48 PM
Ahhh, never ind this thread - I found the code.
This one worls very well.
<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "url goes here";
}
//-->
</script>
This one worls very well.
#3
Posted 26 November 2009 - 05:30 PM
This is a good start, but I will not be happy with this script because this width is not reliable.
I would have the js check the user.agent, which will always work.
I would have the js check the user.agent, which will always work.
#4
Posted 14 November 2010 - 06:04 PM
Ahh, been a while - I have been looking for a better redirection code for the iPhone users
when people visit particular website and the code I used earlier as posted earlier on the 23rd November 2009 doesn't work anymore. Does anyone have a better coding template that will actually work?
when people visit particular website and the code I used earlier as posted earlier on the 23rd November 2009 doesn't work anymore. Does anyone have a better coding template that will actually work?
#5
Posted 14 November 2010 - 07:45 PM
jclarke said:
Ahh, been a while - I have been looking for a better redirection code for the iPhone users
when people visit particular website and the code I used earlier as posted earlier on the 23rd November 2009 doesn't work anymore. Does anyone have a better coding template that will actually work?
when people visit particular website and the code I used earlier as posted earlier on the 23rd November 2009 doesn't work anymore. Does anyone have a better coding template that will actually work?
There is a good overview of methods here including CSS/JS/PHP methods Detect Mobile Devices - Detect iPhones - Detect PDAs - Detect SmartPhones
The PHP method could send the page before the JS is loaded so it may be a bit faster, if you want to go that way post in the PHP forum and I'd be glad to help!
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#6
Posted 14 November 2010 - 08:07 PM
Nullw0rm said:
There is a good overview of methods here including CSS/JS/PHP methods Detect Mobile Devices - Detect iPhones - Detect PDAs - Detect SmartPhones
The PHP method could send the page before the JS is loaded so it may be a bit faster, if you want to go that way post in the PHP forum and I'd be glad to help!
The PHP method could send the page before the JS is loaded so it may be a bit faster, if you want to go that way post in the PHP forum and I'd be glad to help!
PHP would be more easier - so I'll see if I can get something in PHP section...


Sign In
Create Account


Back to top









