Every now and then, I would get the following from Safari:
Here's a screenshot:
Now, I knew that the server was not busy and since I could access the same site in Chrome, it had to be something with Safari itself.
The solution is to remove the cached website data. Simple! After doing this, and restarting Safari, everything starts to work again.
Open the Safari Preferences, and select the Privacy tab, then click 'Remove All Website Data...'
You will be asked to confirm this, click 'Remove Now' to proceed.
This procedure will remove cookies and cached content for websites, which means you will get logged out of any sites you were logged into already. That's a small price to pay for a functioning browser in my opinion.