I want to use an iFrame to demo a mobile device. the thing is that the site I want to demo is http://m.domin.com/ and available only on true mobile device.
Is there any way to force the iFrame to be fake mobile device?
Thanks, Mosh
I want to use an iFrame to demo a mobile device. the thing is that the site I want to demo is http://m.domin.com/ and available only on true mobile device.
Is there any way to force the iFrame to be fake mobile device?
Thanks, Mosh
Not quite sure I understand the question, or what you are trying to do here, so I'll try to answer as best I can.
Why are you creating a mobile specific site? With the state of HTML5 today, there is literally no need for creating a mobile specific site. To test simply open up Google Chrome, open up dev tools, and change your device to an number of mobile devices they let you test virtually.
Alternatively you can use user-agent-switcher if that's your thing. To do this in an iframe you would edit the user.agent for the iframe like so:
navigator.__defineGetter__('userAgent', function(){
return 'foo' // customized user agent
});
navigator.userAgent; // 'foo'
It's apparently pretty finicky in some browsers though according to this previous related answer.