Normally, it is a rogue website that is trying to get you to give them Permission to install something on your device.
Anytime you see something like that, kill the browser NOW, I don't even back out of it, I just hit the Double Menu on the S5 and kill all apps. Then you need to do as mentioned above, clear the cache, uninstall any recent apps that you might have installed as a precaution.
That is why I keep a log of my apps as they are installed, way too easy to forget that you just installed a new one....
Restart the phone to make sure all vestiges of the rogue app is cleared from memory.