|Mucin glycoprotein structure|
First of all, your genetic code includes a set of mucin genes. These particular sequences encode the mucin proteins. They are actually glycoproteins because after the protein portion is made sugars are added to create the final structure. Some of the mucins are secreted to live outside the cell in the tissue fluid, others bind to the membranes of the cells. More than 20 genes are known for humans, making for a complex family of proteins. In fact there are research groups dedicated to figuring these mucus proteins out.
So essentially, the cells of the different parts of the body produce mucus with varying concentrations of glycoproteins, causing differences in the sliminess of the mucus.