Git Product home page Git Product logo

webviewtest's Introduction

WebViewTest

自己的WebView示例

webView.clearCache(true); 如果某个页面进过一次,再次进入的话资源文件会加载地很快。但是调用了clearCache(true)后,进入后又要重新加载资源文件了 视频:one.mp4

webView.clearHistory(); 未调用该方法前,是可以使用goBack()等前进后退的,调用后无法前进后退了,canGoBack的值也从true变成了false。 就像是被切断了返回路径

webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE); 设置了关闭缓存的话,使用前进键和回退键时就会比较卡,因为每一次都是重新加载了,并且断网后前进和后退都变得无法使用了

webSettings.setLoadsImagesAutomatically(false); 设置为false后,图片都不会加载了。此时设置为true,那么页面上的图片就立马会开始加载了。 然后再设置为false,原来那些已经加载的图片不受影响,不过后面网页的图片就加载不出来了

webviewtest's People

Contributors

18319557579 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.