Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

WebView Issues

What are the main issues with using webViews? & What's the cause of those issues?

Should webViews be totally avoided?

What tips/tricks would you recommend as a replacement for using webViews?

— asked September 13th 2010 by Haluk Karamete
  • issues
  • webview
  • webviews
  • with

2 Answers

  • The webView is the most expensive UI element the iphone and android have.
    To load a webview the os needs to load everything related to( the javascript interpreter, the html renderer, all the logic behind( history, cookies, connections, etc))

    It's a whole safari there except the skin.

    Beside this people tend to put a whole framework( 200k of jquery/mootools/ whatever ) just to make some fancy click effect ( no offence please).

    So in other words - avoid it :) and use as much native elements you can.
    If you need http connection you can use httpclient in an "ajax" style.

    — answered September 13th 2010 by Dan Tamas
    1 Comment
    • Great answer. From your reply, I understand it is absolutely avoidable and it should be avoided.

      but that reply questions my mind as…. if it is a bad practice anyway, shoudn't its API be deprecated once and for all - for the sake of stopping Titanium apps from being developed that are doomed to provide a bad user experience?

      Or are there functionalities/features which force you to use webViews and we have no way around it?

      — commented September 13th 2010 by Haluk Karamete
  • You need the webview.
    For now it's the only way to format text painless.
    And you might want to make an inapp browser.

    I don't say not to use it, I only say DON'T use it for tasks that can be made with native components. And for the rest of the cases try to find solutions to use it in the smartest way possible.
    All you have to do it to think like you have to build a webpage that has to run on 486 computer :D

    — answered September 13th 2010 by Dan Tamas
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.