Queries about nectaries.: Nectaries may be floral (inside the flower) or extrafloral (nectaries present on the part of the plant other than the flower. eg.nectaries at the meeting point of petiole and the leaf blade of Ricinus).
As we all know that floral nectaries have a great role in pollination by attracting insects but what kind of advantages do plants experience on having extrafloral nectaries?

Extrafloral nectaries may act as a source of food to insects too. Lets say an ant is searching for food and it finds these nectaries and it searches whole plant for the same and while doing so it pollinates. I assume it is used basically to attract those insects which cant fly….but thats an assumption.
They may also produce something offensive to repell insects of produce some smell that repells other animals too. Kind of protection mechanism.

Interestingly the association between ants and other organisms (orthopods, fungi and plants) may not always involve pollination, although termed as myrmecophily. Myrmecophytes (plants living in association with ants) or ant plants are represented by hundreds of species but mainly concentrated in Fabaceae, Euphorbiaceae and Orchidaceae. They provide shelter and food to ants in the form of beltian bodies, domatia and extrafloral nectaries. The outstanding example is between Acacia cornigera and Pseudomyrmex ants in Africa, wherein the ants protect the plant from herbivores in exchange for food and shelter, by attacking the nose (the most sensitive part) of herbivores which approach Acacia for browsing. Giraffe, however, manages to browse by lapping up leaves by its long tongue, keeping nose away from the attack by ants. More details can be found here: