0

My website is not loading properly inside MAUI WebView on Android - templates are not rendering. Fallowing similar problem Issues in loading Angular JS website in Android Webview how I can enable below setting in MAUI project ?

    webView.Settings.JavaScriptEnabled = true;
    webView.Settings.AllowFileAccess = true;
    webView.Settings.SetSupportMultipleWindows(true);
    webView.Settings.DatabaseEnabled = true;
    webView.Settings.DatabasePath = "/data/data/" + "/databases/";

    webView.Settings.DomStorageEnabled = true;
    webView.Settings.SetAppCacheEnabled(true);
    webView.Settings.SetAppCacheMaxSize(1024 * 1024 * 8);
    webView.Settings.SetAppCachePath("/data/data/cache/");
    webView.ClearCache(true); 

It could be issue is not related above setting, but then why MAUI WebView rendering is different from regular Chrome browser?

Vladimir B
  • 170
  • 1
  • 13
  • I have tested it. AngularJS requires an HTML5-compliant browser and regular Chrome browser supports HTML5 features by default. Although MAUI WebView also supports html5 features, but you have to turn them on first. About how to enable HTML5 in MAUI WebView, you may refer to the link: https://stackoverflow.com/questions/10599739/does-android-webview-browsers-support-html5-features. – Hongxin Sui-MSFT Nov 17 '22 at 09:27
  • Hi Hongxin Sui, can you give me an example for enabling HTML5 in .NET MAUI webview in C# code? I want to use native drag/drop and web components. – Rolf Apr 29 '23 at 15:18

0 Answers0