htmliframefullscreenmeta-tagsdomain-masking

How to get viewport/full screen meta tags in an iframe page effecting the wrapping HTML?


(The title may not be proper but I try my best to phrase it)

Description: I forward a domain(a.com) to another domain(b.com/a) in my domain registrar. To make sure that the user see a.com on the browser URL bar, I enable domain masking for it.

However, I discover that the domain masking in fact using an iframe trick to include b.com/a path from a generated HTML located at a.com by the domain registrar.

<html>
<head>
<title>a.com</title>
</head> 
<body>
<iframe src="http://b.com/a/index.html"></iframe>
</body>
</html>

I have no problem with the iframe, but since pages located at b.com/a (e.g. index.html) are targeted for mobile device (iphone), it has the following meta tags:

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<meta name="apple-touch-fullscreen" content="YES" />

Without the viewport/full screen setting in the external wrapping HTML (although it is in the iframe html page), those pages will not show in full screen on load.

Exact Question: Any way for me to make the viewport/full screen setting in an iframe work in such situation?


Solution

  • Since b.com doesn't need to handle device specific information, the easier way to solve the problem is to make domain masking of b.com to a.com/b. a.com/index.html will behave as we wanted and doesn't cause any problem on b.com.