Updated June 5th, 2019.
If your Mac is behaving strangely when you use Safari, Firefox, or Chrome, it may be infected with “malware.” Malware is bad stuff and it usually gets installed without you noticing, until your Mac slows down and acts weird. You have to get rid of it. Download and install and run Malwarebytes Anti-Malware for Mac, for free, and if it finds something, let Malwarebytes delete it. 100%, no question about it.