I finally have figured out a solution that works for me. I hope this helps others.
Solution:
Preferences > Network > Wi-Fi (or which ever network you have issues with) > Click the dropdown menu (on top) to select Location > Edit Locations... > Click + to add a location > Give any name > Click Done > Click Apply (bottom right)
All the websites were loading perfecting now.
If above solution doesn't work they try following steps before adding new location under network.
Go to terminal and execute following command
sudo dscacheutil -flushcache
Open finder and click on Go in the right top menu while holding the OPTION key > Click on Library > Delete the following folder contents Caches, Logs, Cookies.
After deleting the folder contents, try the solution provided initially i.e to add a new location under network preferences.
I hope this helps someone!