How do I remove iPad/iPhone Safari “locked for security reasons” virus

What is “Safari locked for security reasons” pop-up virus?
While using Safari on your IPad or IPhone, a discerning alert pops up that says “ –Safari Your Apple device has been locked due to security reasons./ Potential Thread Detected! warning: YOUR IOS Device (iPhone or iPad) May Have ADWARE/ SPYWARE VIRUS Call IOS Tech Support… Call helpline at 800-717-9850” or “Your apple device has been locked for security reasons. You are advised to call the number the helpline number +1-800-457-5916 as soon as possible. Please do not use your device it may lead to stealing of data, contacts and personal information…Kindly speak to the customer care representative in order to get this resolved. Call Support for Apple now on +1-800-457-5916”, ““ATTENTION! Your phone has been blocked up for safety reasons””, “Your Apple device has been locked due to security reasons. Call helpline at …” etc.
“Safari locked for security reasons” is a scam.
How to remove “Safari locked for security reasons” pop up virus?

If you’re using Safari,

You can Clear information from your iPad or iPhone device:

1. iOS 7
Tap Settings – Safari – Clear History – Clear Cookies and Data.

2. iOS 8
Tap Settings – Safari -“Clear History” and then tap “Clear History and Website Data ”.

If you’re using other browser, uninstall it then reinstall.