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?

2
  • 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: stackoverflow.com/questions/10599739/…. Commented Nov 17, 2022 at 9: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. Commented Apr 29, 2023 at 15:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.