Try and make the 1st Mark up available on Mobile I.e (Mj_AllFooter) at
m.urdomain.com or any you're using...
And the second Mark-Up available on the Desktop view. I.e (Footer or any position u prefer) at
www.urdomain.com...
Don't think of coding a (<a) direct linking to yourdomain.com?device=anything.
Otherwise, you'll keep been disturbed by Cache/Cookie issue.
The best and easiest option is the 2 Mark UP modules available in your module list.
Just set them appropriately as above and your visitor won't need to clear cookie before been returned to normal PC view.