To use Wi-Fi the way you want, you can change how and when your phone connects.
When you have Wi-Fi turned on, your phone automatically connects to nearby Wi-Fi networks you've connected to before. You can also set your phone to automatically turn on Wi-Fi near saved networks.
Turn on & connect
Swipe down from the top of the screen.
Touch and hold Wi-Fi.
Turn on Use Wi-Fi.
Tap a listed network. Networks that require a password have a Lock.
Tip: After you connect, the network is "Saved." When your phone is near and Wi-Fi is on, your phone automatically connects to this network.