Friday, November 7, 2014

How to reload the html page when debugging iOS/Android webview

When debugging the javascript using Safari for ios uiwebview or Chrome for android webview, sometime it needs to force to reload the html page to repeat the issues that only happens during the page loading, or to restart the page without restarting the app.

For ios, from safari's web inspector, select resource tab, and then select the root item, there is a refresh icon beside the root item, click it will reload the html page

For android, in chrome, first selecting the app from the page of
chrome://inspect/#devices
then in Chrome's Developer Tools, select Source tab, from the console window type

location.reload(true)

By doing so, any javascript breakpoints will be kept in there, and available when the html page gets reloaded.

1 comment:

  1. Using IOS one can able to build views. user can handle user interaction via controls such as buttons, switches, and sliders etc. user can create alert boxes, handle navigation and transition between views. follow iOS Swift Online Course Bangalore

    ReplyDelete