Mobile Safari Meta Tags Not Working If Loaded Via LOCAL Webview

You must Login before you can answer or comment on any questions.

We have an app that uses a lot of webviews, and have managed to get the web content (images and text) looking correctly on iPHone4 high res and on older iPhones by making the page very large, and having the page scale automatically using this meta tag in the html of the page:

<meta name="viewport" content="width=device-width; 
initial-scale=0.5; maximum-scale=0.5; user-scalable=0;" />
It's working perfectly on remotely loaded urls, but I need to add some event calls to the remote HTML, and from what I've read here, I can only trigger those events if the html loaded in a web view is loaded locally. So, I cam grabbing the remote HTML, saving it locally, then opening it as I did before. The issue is that if the page is loaded locally, the meta tag above is ignored...

So, I have 2 questions.

1) Is there ANY way to allow remote html to fire Titanium events, or is that really only possible from locally loaded html?

2) Is there any way to apply the meta tag:

<meta name="viewport" content="width=device-width; 
initial-scale=0.5; maximum-scale=0.5; user-scalable=0;" />
to locally loaded html?

Thanks,

Peter Janett

— asked 3 years ago by Peter janett
3 Comments
  • Did you find the solution?

    — commented 10 months ago by Adnan Ahmad

  • Modify the following example that sets viewport properties dynamically:

    https://gist.github.com/933459

    — commented 9 months ago by Dejay Clayton

  • @Dejay Clayton, Thank you for that github link, it worked perfect for me.

    — commented 3 months ago by Oguz Furkan Kaytancı

Your Answer

Think you can help? Login to answer this question!