HTML5 supports seamless IFRAME , which now allows you to include HTML headers and footers. I tried this in the Android browser (2.2), which I thought was supposedly based on HTML5, but it didn't work. Is there a way to make an HTML file on Android?
My sample I tried consisted of index.html, header.html and footer.html. In index.html, it had:
<!DOCTYPE HTML>
<iframe seamless="seamless" src="header.html" sandbox="allow-top-navigation allow-scripts allow-forms allow-same-origin"></iframe>
My content goes here
<iframe seamless="seamless" src="footer.html" sandbox="allow-top-navigation allow-scripts allow-forms allow-same-origin"></iframe>
In header.html, it had:
<html>
<head>
<link rel="stylesheet" href="android.css" type="text/css" />
<title>Test App</title>
</head>
<body>
<div class="home page">
<h1>Test App</h1>
<div class="home content">
In footer.html he had:
</div>
<div class="home footer">
</div>
</div>
</body>
</html>
But when I ran the code on the Samsung Galaxy Tab tab running Android 2.2, I had two IFRAMES that were not seamless, and the page displayed as if it were in HTML4.01.
source
share