//设置缓存模式为WebSettings.LOAD_CACHE_ELSE_NETWORK webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
setCacheMode默认模式为WebSettings.LOAD_DEFAULT
LOAD_DEFAULT优先从缓存获取未过期的资源加载,否则从网络加载资源;LOAD_CACHE_ELSE_NETWORK优先从缓存获取资源加载,即使缓存已过期,否则从网络加载资源