It's easy to see why online shopping is so popular. Just a couple of clicks and that new pair of socks is winging its way to you at breakneck speed. And they can get it to you in two days for free? Click.

But we care about the planet, so should we really be shipping individual pairs of socks? Or should we just drive to the closest store?

There are lots of good arguments for buying local, but if you’re trying to reduce your impact on the climate, local isn’t always best. If you compare online shopping with driving to the store, in many cases online shopping can have a smaller carbon footprint: Trucks have to deliver goods to stores, just like they do to your house.

Problems start when we opt for speed: We don’t just want things delivered to our door, we want them delivered to our door right now. If we can get a pair of socks delivered in two days instead of five, we’re going to choose the faster option, especially if it’s free.

“Before, companies were able to consolidate, to optimize their distribution. Now, because some of them are offering really fast and rushed deliveries, that disintegrates the consolidation,” said Miguel Jaller, from the Institute for Transportation Studies at the University of California Davis. “Every individual is buying more and wanting those goods to be at their home really fast. That creates more vehicles, more traffic, and potentially more emissions.”

From a logistical perspective, the ability to get a pair of socks delivered to your door in less than a day is something of a triumph. But from a climate perspective, that speedy pair of socks takes us in completely the wrong direction, putting more of the most polluting vehicles on the road.

“If you look at passenger vehicles, they’re pretty darn clean at this point,” said Matt Barth, director of the Center for Environmental Research and Technology and a professor at UC Riverside. “Trucks are a different animal.”

Unlike passenger vehicles in the US, the focus of the bulk of emissions regulations to date, most trucks still run on diesel fuel, which produces larger amounts of air pollutants. Swapping clean car traffic for dirty truck traffic is a big step backward.

This doesn’t mean you have to throw out your holiday shopping list from climate guilt: There are things we can do right now to make online shopping cleaner. On the consumer side, we can opt for slower shipping times and try to consolidate our orders. From the company side, they could be doing a lot more to nudge us in that direction by providing incentives and simply alerting us to the fact that slower is greener — and it saves companies money, on top.

Delivery companies have been working on efficiency for decades, mostly to reduce costs. Since the 1970s, UPS has worked on ways to encourage drivers to take fewer left turns, reducing their emissions by around 100,000 metric tons of carbon dioxide every year. New technologies, from smart traffic lights that communicate with delivery vehicles to trucks that can drive in tight platoons to reduce wind drag and save on fuel, are also speeding our way in the coming years to help solve this problem.

Watch the video above with Jaller, Barth, and others working on new ways to get your socks to you quickly and guilt-free.

Learn more about groundbreaking work to solve the impact of transportation on climate change at climate.universityofcalifornia.edu.