The TSA's rules about packing liquids, gels and aerosols are definitely inconvenient for travelers – but as you attempt to master the art of fitting five tons of toiletries in a small plastic bag, remember that it's even more inconvenient for terrorists. The 3-1-1 rule, which dictates how flight passengers can pack liquids, gels and aerosols in their carry-on luggage, was put in place after a 2006 plan to deploy liquid explosives on planes was thwarted. Familiarize yourself with the finer points of the rule to make sure that you, your toothpaste and other essentials make it through security without delay.

Most Toiletries

Four criteria determine whether a given item belongs in your 1-quart bag. If it's going in a carry-on, if it's not on the TSA's list of forbidden items, if it's not one of a few exempt items and if it's a liquid, gel or aerosol, it must conform to the 3-1-1 rule. Under the rule, each passenger is allowed to pack a single 1-quart bag of liquids, gels and aerosols, each in a container of 3.4 ounces or smaller.

Shampoo, conditioner, body wash, hair gel, face wash, lotion, toothpaste, hairspray, mousse, contact lens solution, shaving cream or lotion, aftershave and perfume/cologne all fall under the 3-1-1 rule. So do mascara, liquid foundation or coverup, nail polish, lip gloss, makeup remover and other similar cosmetics. By contrast, stick deodorant, lipstick and moist wipes don't come with restrictions. (Note that gel candles aren't allowed in carry-ons at all. Pack them in checked luggage.)

Food and Drinks

A big bag of crackers and a packet of peanut butter make an easy-to-pack airplane snack – or do they? The crackers are fine, but peanut butter falls under the 3-1-1 heading. So do yogurt (including squeezable yogurt tubes) and other soft, paste-like foods such as applesauce, cream cheese, sauces and honey. Any beverages must also fit into the 1-quart bag, with the exception of those that are medically necessary or intended for a young child.

Exempt Substances

Breast milk, juice, formula and baby food are exempt from the 3-1-1 rule when you're traveling with an infant or toddler. The TSA allows passengers to carry as much of these liquids as they need through security, provided they pass the security screening process. Parents are also allowed to travel with breast milk in amounts greater than 3.4 ounces even when no child is present. Medications are exempt from the 3-1-1 rule, but must be screened by the TSA.

These guidelines only apply to items you bring through security. Drinks and other liquids, food and gels and aerosols purchased inside the secure area of the airport don't have to conform to the 3-1-1 rule.

Outlawed Liquids, Gels and Aerosols

The TSA allows travelers to bring most types of liquids, gels and aerosols aboard a plane, but it does outright forbid a few items. Fuel of any kind, including that used for camp stoves, isn't allowed in carry-on or checked baggage. Neither is bear spray. Self-defense sprays and pepper sprays may be packed only in checked luggage and even then only if they are less than 2 percent by mass of tear gas and have a mechanism to prevent them from being sprayed accidentally. Each passenger is limited to one container of 4 ounces or smaller. The TSA also forbids travelers from packing spray paint and any flammable gel, liquid or aerosol paint.