http://newhtml.net/modify-page-for-mobile/
http://www.html5rocks.com/en/mobile/mobifying/
======================
关于link .css或.js
在pc上第二次请求服务器会返回304
在webview跟本不会发起第二次请求。直接会读取缓存。
http://stackoverflow.com/questions/2149438/tool-to-see-android-database-tables-and-data
There is a tool (sqlite3) installed on the phone itself. You should be able to do this if you have ADB installed on your machine & your phone is connected or currently being emulated.
Find the database files:
adb shell find /data -name *.db /data/data/com.google.android.apps.maps/databases/search_history.db /data/data/com.qo.android.htc/databases/webview.db /data/data/com.qo.android.htc/databases/webviewCache.db /data/data/com.layar/databases/layar.db
或者select your database (Into Androd --> File Explorer ),You will get an option as "pull a file from device", click on it.
Open a database using the sqlite tool:
C:\> adb shell # sqlite3 /data/data/com.google.android.youtube/databases/history.db SQLite version 3.5.9 Enter ".help" for instructions sqlite> .tables android_metadata suggestions sqlite> .schema suggestions CREATE TABLE suggestions (_id INTEGER PRIMARY KEY,display1 TEXT UNIQUE ON CONFLICT REPLACE,display2 TEXT,query TEXT,date LONG); sqlite> select * from suggestions; 2|randy pausch last lecture|Results for "randy pausch last lecture"|randy pausch last lecture|1264159994987
或者sqlite database browser could also be helpful, though you need to pull a copy of the database from the device as explained before and work on that copy that can be restored later on.
在android 4.0 webview 使用loadData 会出现中文乱码, 这个时候要使用loadDataWithBaseURL方法
//loadData(html, "text/html", "UTF-8");
loadDataWithBaseURL(null, html, "text/html", "UTF-8", null);
<img src="images/laba.png"> <img src="images/laba.png?v=2">
4.0对于页面里的特殊符号,可能也会导致无法解析,使js方法不能执行完成。
webview对于js方法里的换行无法解析!
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
android客户端方法String fun();
js调用,返回的是Object类型,而不是String,这个问题出现的android2.2(2.3及以上是ok的)的机型上。
解决办法:window.demo.fun() + ""
s
s
s