I am wondering (in chemical details) why some medicaments come in pill and some in loation. I know that a pill goes til the entire body, and loation is more direct located, but how come there not be a gel for headaches to target the Temple, where I believe most headaces accour.

If you could provide some books on why, or if it has something to do with the blood-brain-barrier, litterature for that as well, I would appreciate it