iPhone Safari does not auto scale back down on portrait->landscape->portrait

This has to be a bug in iOS 4 Safari. Here’s what my behavior was with the following meta tags (the second tag is to make it full screen): <meta name=”viewport” content=”user-scalable=no, width=device-width”/> <meta name=”apple-mobile-web-app-capable” content=”yes”/> Page would scale correctly when going from portrait to landscape until I used the pop up keyboard to enter … Read more

Force link to open in mobile safari from a web app with javascript

This is possible. Tested with iOS5 stand-alone web app: HTML: <div id=”foz” data-href=”http://www.google.fi”>Google</div> JavaScript: document.getElementById(“foz”).addEventListener(“click”, function(evt) { var a = document.createElement(‘a’); a.setAttribute(“href”, this.getAttribute(“data-href”)); a.setAttribute(“target”, “_blank”); var dispatch = document.createEvent(“HTMLEvents”); dispatch.initEvent(“click”, true, true); a.dispatchEvent(dispatch); }, false); Can be tested here: http://www.hakoniemi.net/labs/linkkitesti.html

iPhone “Bookmark to Homescreen” removes cookies and session?

A really simple approach could be to use a unique token in your Bookmark-URL which can serve you as a unique device identifier. Example: http://myWebApp.com/?token=randomId29238/1 The token can be generated at the server side at opening time of the application in Mobile Safari and before the user is prompted with the “Add to Home Screen” … Read more

Stop reloading of web app launched from iPhone Home Screen

I just found this related question on SO: Stop native web app from reloading itself upon opening on iOS As it seems it’s a limitation of Safari, a proposed solution is to persist your web apps state using Javascript and HTML5 localStorage. When your web app is launched, check for the persisted state and load … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)