I have a galaxy s4. It have a wifi connection problem. Wifi connection is good but doesn't working internet connection. At the same place I used another device(LG G4)is working good both of wifi connection and internet connection. I don't know why just galaxy s4 is disconnect to internet.
If I understand correctly what you are saying is that you are connected to the wifi network but you are not getting Internet from that connection.
-You can try to turn off and on the wifi on the device.
-Reboot your phone
-Reboot your router.
-Check your router setting to see if you have a mac address whitelist or some sort and check that the dhcp is working well on the router.
Hope this helps.
It seems to be a problem with the Galaxy since the LG is working fine. What kind of browser are you using? I would try to uninstall the browser and reinstall it. Also try to install a different browser.