How can I stop popups from crashing my phone browser?

Episode 1213 (52:19)

Ed from San Jose, CA

Ed was surfing on his iPhone in privacy mode and his app screen suddenly locked when he was searching, saying he was engaging in illegal traffic and he had to pay $500 to unlock the screen. Leo says that's a scam done by Javascript. His phone really isn't locked down. It's not leaving anything on the system. It's "sandboxed." It's not perfect, though, as there could be holes in the Javascript code. Leo suggests double tapping the home button and swiping up to kill the app. On the desktop, NoScript will prevent this from happening by blocking Javascript. But most websites use Javascript now, so his surfing experience may be diminished by doing that.

Safari on the iPhone has the ability to disable Javascript and there's also a fraudulent website warning in privacy and security settings.