It's best to recycle glass. If your community has a recycling program, collect glass containers and periodically deliver them.
Some models cannot compress glass. Refer to your owner's manual for details. If you are able to put glass bottles and jars into your compactor, take care to make sure that they're not near the bottom of the bag or near the sides. Broken glass could tear the trash bag or injure the person who changes the bag.