Safari randomly stops loading pages
I'm running OS X 10.10 (Yosemite) with Safari 8.0 (10600.1.25). Randomly when I'm using Safari it just stops loading pages. It's as if I loose internet connection but when I open the same page in Firefox it works fine. It doesn't have to be a page with a lot of content, for example Google just stalls in Safari but runs fine in Firefox.
I've tried clearing caches and removing all website data. I've also tried closing and reopening Safari and restarting the computer. Again this doesn't always happen.
MacBook Pro (Retina, 15-inch, Early 2013), OS X Yosemite (10.10)