Can’t resist the confectionary aisle? Shop online!

If you can’t walk past a good grocery bargain — no matter how much damage it will do to your diet — a new study suggests shopping online can make your trolley cheaper and healthier.

From the University at Albany, State University of New York, their preliminary studies showed that online grocery shopping can help you stick to a healthy diet, particularly for people who are impulsive buyers.

When comparing a monetarily-restricted online trolley of high-impulse and low-impulse shoppers encouraged to purchase “nutritious, affordable and tasty” foods, there was no difference in nutrition — both were quite good.

“It didn’t matter how impulsive a person was,” said lead study author Jaime Coffino. “The nutritional outcomes didn’t vary.”

Restricted by money and by the online format, which prevents people from taking leisurely strolls down the confectionary aisle or past “sale” signs on chocolate bars, online carts were more nutritious and more budget savvy.

While there’s more research to be done, this could be a good way to keep your diet on track if you’re an impulsive shopper.