What can i do to stop from going back to homepage every five decounfs while im browsing the net
While clearing the cache and checking your network settings are excellent suggestions, if they DO NOT resolve the problem then it is likely you have a weak or bad connection to your Internet provider (either the cellural data link and/or the WiFi link). This can occur due to a weak or intermittent signal or due to strong signal interference. I suspect the latter because you seem to be able to connect easily (indicating at least a good initial signal), but then it abruptly drops. Interference can come from many sources (motors, microwave oven, competing radio signals, nearby electrical lines, or a neighbor's WiFi signal on the same frequency and channel, etc.) It can also be caused by other devices on your own network such as a satellite box, a printer, or a streaming device that also connects to your Internet provider's signal.
A simple way to troubleshoot WiFi interference is to look at other ambient signals. Download an app called WiFi Analyzer from the Google Playstore. Run the app and very slowly move around the areas where you access the Internet. All measurable ambient signals will be displayed, including your primary signal, with their channel and relative signal strength. If there are others that approach or surpass your primary signal on the same channel, then WiFi interference is a likely source of your problem. The fix: change your router's signal to another (unused) channel. This is done by entering the router's setup routine and modifying that setting (usually at an internal URL address at or similar to http://192.168.1.1 - the exact URL and directions are on the documentation that came with your router or on the manufacturer's website).
The WiFi Analyzer may well identify the problem. But it will not identify other local sources of interference nor a weak primary signal, such as mentioned above. But changing the router channel may still help.
Or, you may eventually need to invest in a better router (N or AC protocol, and dual frequency) and/or switch to another service provider with a stronger signal in your area.