A couple of questions...
Q 1) Did this problem start with W8? That is did it ever work OK on W8?
If this is the case, your network (you did not give details, wired, wireless) device driver probably needs to be updated or re-installed.
Q 2) Have you tried other browsers, like IE that is part of W8, do you get the same error?
I had a problem just connecting when a W7 computer was upgraded to W8. LinkSys AE2500 USB wireless adapter. I failed to connect (yes, a different problem) most times on boot. I found if I disabled it and then enabled it, it connected and worked with no problems, until the next boot when it had to be done again. So I'm wondering if you should get the error, if you went to Device Manager and disabled and enabled the network device if it would work then? If so and indication of a driver problem.
I found THIS LINK, many suggestions in it and it seems some of them might fix the problem. Take a look at it, but read all of it.