Generic Imitrex is used for the treatment of migraine headaches with or without aura (eg, flashing lights, wavy lines, dark spots). An aura is a strange feeling or visual disturbance that warns you of an attack. It is not used to prevent migraines.
Generic Topamax is used for treating seizures in certain patients. It may be used alone or with other medicines. It is also used to prevent migraine headaches.