Better eyelid hygiene
A good eyelid hygiene is important to prevent getting stye always wash your eye and eyelid area with clean water and frequent washing is required if you are living in unhealthy conditions. Try to avoid the use of over makeup and other cosmetic products which may pose the risk of getting sty and other eye infection.
Avoid contact of the eyelid with expired or contaminated cosmetics
Avoid using products that are expired or contaminated and using products used by others. Maintaining a healthy lifestyle is very much important to prevent all sorts of infection

Relax
stress is a risk factor for getting stye and minimise stress levels and find time to relax from daily work hours. Stress makes you live life unhealthy and make your mind dull to pay attention to healthy lifestyles
Scrubbing is a method of removing all the clogged eyelid follicle and helps from getting an infection. Using mild baby shampoo will open the pores and help remove debris from the eyelid area
Compress
Warm or cold compress will help to relieve the tenderness and pain associated with the stye

How to prevent stye in kids and home remedies
Always instruct kids to wash their hands which will help stop getting the bacteria into eye and faces. Another remedy once you got stye is put the warm cloth over your eye so that the clogged gland will open up prevent from getting infected. Applying warm cloth over the eye for 10-15 minutes three to four times a day will drain the pus out of the stye . Since the kids are very active and they are less likely to wash their hands and more likely to rub eyes than adults so there are chances of getting infected so parents are advised to check kids hygiene on a regular basis. Bacteria that caused the infection stay in the nose and kids are more to tend to pick the nose and put into the eye so it is advisable to teach the kids about the hygiene at early ages. Do not use the same washcloth for eye and face this will cause cross contamination. Chances of getting stye are more in a toddler who is at daycare so special instruction need to be given to daycare staff regarding the hygiene. If one eye is infected chances are more for the other to get infected. A warm compress is not relieving the stye within a week parents are encouraged to seek medical attention. Doctor may prescribe antibiotics