cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastien Lorber (JIRA)" <>
Subject [jira] [Created] (CB-9346) Cordova index.html doctype has huge Android performance impact
Date Fri, 10 Jul 2015 11:47:04 GMT
Sebastien Lorber created CB-9346:

             Summary: Cordova index.html doctype has huge Android performance impact
                 Key: CB-9346
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 4.0.0
         Environment: Nexus4 (4.4.3), SKD22, minTarget=16, target=22, Ubuntu 12.04, cordova-cli=5.1.1
            Reporter: Sebastien Lorber


This is another case were the exact same app, running on the same device, is slower in webview
than in mobile browser.

In my company we have a mobile website, that runs fine in mobile web browser.

We started to port it to a cordova/phonegap application so that is runs in webview and is
available in Android/iOS stores.

So I'm trying to run for some days the app in a Cordova shell. It works, but is really is
a lot slower than using the mobile browser.

As far as I know, I run 4.4.3 version of Android so it's supposed to use new Chromium-based
webviews that are faster than former android webviews.

According to readings on the internet, I tried many things, including changing the hardwareAccelerated
true/false, updating the min/target SDK, or even using the Crosswalk plugin. None of these
had a significant effect.

Also I noticed some little CSS bugs in the Cordova version compared to the mobile version,
like a scrollable container that did not have the appropriate height... I finally figured
out that we were using `<!DOCTYPE html>` on the Cordova index.html while we were not
in the html served for mobile browsers.

So I tried to remove the <!DOCTYPE html> from the index.html of Cordova, primarily to
fix the CSS bug (

After removing the doctype, it solved the CSS bug, but also solved the performance issue!

Can someone explain why this doctype has any impact on performances? Is it a Cordova bug?

I can notice that the doctype is included in all Phonegap examples I've seen so far. Is it
really required? And what can be the impact of removing this doctype?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message