Question: How can you keep cooked sugar from crystallizing?

January 22, 2013
I am trying to make homemade syrup but after a week or two the sugar crystallizes. I need it to have a shelf life of a year or two. Is there a way to use just the flavor, sugar and corn syrup and have it keep for 1-2 years? What is the best way to make sure the sugar doesn't crystallize?