目录

What should I do if a white screen is displayed or the page cannot be displayed when the Web component loads a page?

Before using the Web component, ensure that the following conditions are met:

  1. To load an online page, ensure that your phone is connected to the Internet and the network connection is normal.
  2. To access an online page, add the ohos.permission.INTERNET to the application.
  3. To load related resources, enable fileAccess, imageAccess and onlineImageAccess.

If the preceding conditions are met, you can perform debugging based on the HTML error information.

If the white screen persists, the page code may be incorrect. You can use a browser to open the corresponding URL to check whether the page is normal, or use DevTools to debug the frontend page. For details, see Debugging Frontend Pages by Using DevTools.