How to design web pages for the iPhone and iPod Touch
How to design web pages for the iPhone and iPod Touch
Written by Scott in Friday, December 5th 2008   
I'm working to convert one of my websites into an iPhone / iPod Touch compatiable design and wanted to share with you a few lines of code that has pointed me in the right direction: <meta name="viewport" content="initial-scale=2.3, user-scalable=no" /> <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> <script type="text/javascript"> var updateLayout = function() {   if (window.innerWidth != currentWidth) {     currentWidth = window.innerWidth;     var orient = (currentWidth == 320) ? "profile" : "landscape";     document.body.setAttribute("orient", orient);     window.scrollTo(0, 1);   } }; iPhone.DomLoad(updateLayout); setInterval(updateLayout, 500); </script> I know [+]