OS X Yosemite Safari proxy problem

I work behind a proxy and after updating to Yosemite, Safari randomly stops working (Firefox, Chrome and everything that needs an internet connection keeps working, just Safari won’t load pages). After trying lots of things this seems to have worked for me, just follow those steps.

1) Open Utilities > KeyChain Access.app

2) In [login], look for your proxy entries

3) Right click on both and select copy

4) In [system], if you see something similar, i suggest you remove those entries first (we will add them again in the next step)

5) In [system], right click and click paste (if it asks for your credentials, just enter your credentials and click ok)

6) Make sure one entry is for HTTP and one entry is for HTTPS and make sure the Account Name and Password are correct (you can check this by double clicking the entry)

7) For every one of the entries you just pasted, double click (enter credential if necessary) and go to Access Control

8) Select Allow all applications to access this item, click save changes and restart computer

9) Some applications might still ask you for permission to use the key in KeyChain, just say yes and enter the necessary credential

Source: http://stackoverflow.com/questions/19575183/system-proxy-not-working-on-os-x-mavericks