Many times my Blue wi-fi connection icon turns from blue to white colour at top right hand screen.

.
When that happens there is no internet, but it still says it is connected.
But my other devices and computers connected to that router still work for internet.
Only Nexus 4 phone not working..
I have to turn power off and back on my router then wi-fi icon at the top turn from white to blue
colour again, then it starts working , the internet.
Why this happen and how I can prevent this from happening ?
Thanks
Thanks.

.
When that happens there is no internet, but it still says it is connected.
But my other devices and computers connected to that router still work for internet.
Only Nexus 4 phone not working..
I have to turn power off and back on my router then wi-fi icon at the top turn from white to blue
colour again, then it starts working , the internet.
Why this happen and how I can prevent this from happening ?
Thanks
Thanks.