Somehow got Porn on iPad
You'll want to install a safari content filter / content blocker to prevent advertisements and/or javascript from sites that are advertisement supported and possibly pay for access if they detect ad blockers.


https://daringfireball.net/2015/07/safari_content_blocker_imore
https://itunes.apple.com/us/app/adamant/id1029747593?mt=8 - Adamant
https://1blocker.com


I have a high opinion of both the 1Blocker and Adamant for iOS and you could use one or the other or both depending on your needs.


https://www.macworld.com/article/2984483/ios/hands-on-with-content-blocking-safari-extensions-in-ios-9.html


I would say the vast, vast majority of hijacked web sessions is advertising related. Compromising them is so easy for people with a little money and a lot to gain for forcing people to see content they didn't expect on a site.