Go step by step and test.
1. Power off the router. Unplug it from the wall. Wait a while.
Plug it back to the wall. Power the router on. Wait until all lights are lit properly. It will take a while.
Restart the computer.
Start up in Safe Mode.
https://support.apple.com/kb/PH18760?locale=en_US
2. Delete Caches.db
Close all windows and quit all applications.
Hold "option" key down and click "Go" menu in the Finder menu bar.
Select "Library" from the dropdown.
Library > Caches > com.apple.Safari > Caches.db
Right click the Caches.db file and select "Move To Trash”.
Close windows.
Restart and relaunch Safari.
3. Empty Caches
Safari > Preference > Advanced
Checkmark the box beside "Show Develop menu in menu bar".
Develop menu will appear in the Safari menu bar.
Click Develop and select "Empty Caches" from the dropdown.
4. For more info: https://support.apple.com/en-us/HT203353
If this doesn’t help, please run EtreCheck and post the report here.
http://etresoft.com/etrecheck
Download it, open Downloads folder, click on it to open and select ”Open”.
“Choose a problem” from the popup menu box and then “Start EtreCheck” in the dialog.
Click “Share Report” button in the toolbar, select “Copy to Clipboard”
and then paste it when you reply.