I think that immunoglobulin G must be what protects people from catching the exact same type of cold that they have had before. The problem is that there are seemingly endless types of colds.
I have noticed that if someone in my office catches a cold just like one that I had a month ago, I don't become reinfected. Sometimes, a coworker will show up sick with the sniffles when I haven't been sick all year, and I don't get it. It must have been one that I have had in the past.