Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I know I could disable JavaScript in most Browsers. Is one able to disable it for WebViews also? I mean every App could specify its own WebView and is able to turn JavaScript on/off inside their app and they could inject JavaScript that infects my phone somehow. I'm aware that this WebView may lose its function or behave in an unexpected way. If it matters I have a Galaxy Nexus with JellyBean.

share|improve this question
    
nothing can infect your phone if it's not root,especially Java Script. –  Mohamed Essam Sep 14 '12 at 19:57
2  
WebView is usually used to display web pages that the app developer has predefined, if you don't trust the app developer only giving you trusted web pages, you have a bigger problem, why do you have that app installed in the first place? The app is more dangerous than the web view. –  Lie Ryan Sep 16 '12 at 5:23
    
Also, since Android apps runs in sandbox it has a very good security, the worst an injected script can do is run amok with the apps data, and even that is only if the app developer had allowed them to do that. Given there's four layers of security, the JavaScript sandbox, WebView sandbox, app sandbox, and kernel security; you don't really have much to be worried about with malicious JavaScript. WebView isn't IE. –  Lie Ryan Sep 16 '12 at 5:39
    
shure, I understand all these. I just thought, that it might be, that a devolper kind of "outsources" his malicious Code inside JavaScript, so no-one who is checkin the source of the App will find something supect. –  Rafael T Sep 16 '12 at 15:41
    
Javascript is a totally sandboxed environment - in fact, there are limitations with Javascript - cannot access files, and is contained, so there is very little chance of a javascript exploit that will cause your phone to boot-loop or reboot... –  t0mm13b Sep 19 '12 at 14:04
add comment

1 Answer

up vote 1 down vote accepted

If the developer do not give you access to the (Web)Settings of the WebView, you will not be able to disable JavaScript in the WebView.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.