Writing CSS style data to a page via ethernet shield

It kind of looks like the browser is refreshing, but the button does not change, the current behavior is as follows:

First load of page= LED OFF, ON BUTTON DISPLAYED - correct
First click of button = LED ON, ON BUTTON DISPLAYED - incorrect
Second click of button = LED ON, OFF BUTTON DISPLAYED - incorrect
Third click of button = LED OFF, OFF BUTTON DISPLAYED - incorrect
Forth click of button = LED OFF, ON BUTTON DISPLAYED - correct
.
.
.

I cant fathom it?