Hide URL iPhone

Did you ever wonder how to get your iPhone web app to retract the URL bar automatically?

Code Example:

<h1><font>My Site For iPhone</font></h1>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
.header{width:200px;height:100px;background:#f00;}
</style>
<script language="javascript" type="text/javascript">
<!--
window.onload = function() {
setTimeout(function(){window.scrollTo(0, 1);}, 100);
}
-->
</script>
</head>
<body>
<div class="header"></div>
</body>
</html>

Explanation:

gear

The nuts and bolts of the script work as follows: The script says "window.onload = function()" (When The Page Loads) "setTimeout(function(){window.scrollTo(0, 1);}, 100)" (I want you to wait a 10th of a second then scroll the 1st tag (the h1 tag) above the browser).

See:
How To Hide URL On iPhone iPod
How To Make Java Script Detect For iPhone & iPod
How To Make Apple Touch Icon Favicon For iPhone iPod