简体   繁体   中英

Prevent CSS & Javascript from being load - WebView

Currently I have a news website that I display in a webview in my android application. But the performance of the webview is bad and I want to improve it by blocking css and js. Is there any simple way I can do this ?

For css you can use conditional media queries for different screen sizes (although css shouldn't cause much performance issues unless you use transitions and all other fancy stuff)

For javascript, you could add conditional checks for the device as well. You can reference this question which I find answers it pretty well

Detecting a mobile browser

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM