First, I have never seen anyone use one of those goggles; if you ask me, that's utter nonsense, but go ahead and do your own research. Or just try them, 18 $ is not that much, and you can always return them if you order from Amazon (even though that's not ecologically responsible) ...
There are a couple of problems related to staring at a monitor for a prolonged time, which include depletion of your eye's Rhodopsin stores (cause of several vision-related problems), a lowered blink rate which will dry out your eyes (which in turn is bad for you in a couple of ways) and a reduced melatonin production (which causes sleeping problems). There are a couple of things you can do (I don't make any promises that this list will be exhaustive):
The 20-20-20 rule. For every 20 minutes of staring at a computer, look at something that's at least 20 feet away from you, for at least 20 seconds. I also find it useful to focus on different things at varying distances. This will prevent tunnel vision and give your eyes a break.
Massaging. Sounds stupid, but I find massaging my eyes every now and then quite relaxing on the eyes. What I do is rub my hands to warm them up, then press them on my closed eyes, rotating them slowly. There are more techniques out there, you should go ahead and google a bit, try out different techniques until you find one that works for you. There's also a couple of other exercises that come down to use your eyes for something other than staring at your monitor from time to time.
Vitamin A. Vitamin A is supposed to prevent several vision problems for reasons. While I'm not sure if it will have any noticable effect on your eyes and it certainly won't keep your eyes from getting exhausted, eating a carrot every now and then won't hurt anyway.
Monitor temperature. The problem with computer monitors is that they mostly emanate blue light which is also bad for us. This has for example been shown to cause sleep issues. To reduce that effect, use f.lux or similar software that will adjust your monitor's color temperature. I have used it for some time and find it increases the time I can spend in front of a computer screen (especially at night) before my eyes start to hurt. A little warning: This will conflict with color correction / grading. I once color corrected a video that turned out completely blue and cold, because I compensated for an overall warm look that was actually caused by f.lux, so make sure to turn it off before doing color-sensitive work. For smartphones, there's Twilight. (f.lux and Twilight look curious at first, but you'll forget they're even there after a couple of days, so stick with it through this initial awkwardness.)
Distance to your monitor. Maintain a healthy distance between your head and your monitor. This means at least an arm's length (though some sites will tell you it should be more or less; there isn't an exact answer, really).
Take breaks and listen to your eyes. Even if you do all those things, eventually your eyes will tell you to take a break. When they do, listen to them! We're just not made for spending 8+ hours looking at a computer screen, so make sure to take regular breaks and do something else every now and then. You can also monitor your screen time and note how long it takes for your eyes to start aching, and then adjust your break frequency accordingly.