explicit "switch to mobile theme" link with Theme Key I'm using Theme Key https://www.drupal.org/project/themekey to switch automatically between themes dependent on browser and/or OS id. 
Now I would like to allow the user to explicitly switch to or from to one or the other theme by clicking a link too. ThePersistant URL https://www.drupal.org/project/purl module might be helpful for this but how exactly can I go about implementing this?

EDIT 1

I followed Answer 1, added drupal_add_library('system', 'jquery.cookie'); into the already existing function marinelli_preprocess_page(&amp;$vars) in my template.php.

I setup two ThemeKey rules like: 

system:cookie = "theme=marinelli" THEME [Marinelli] 


and 

system:cookie = "theme=skeleton" THEME [Skeleton]


and 
added following html to my page:

&lt;p&gt;&lt;a href="#" onclick="$.cookie('theme', 'marinelli')"&gt;Switch to Marinelli&lt;/a&gt; &lt;a href="#" onclick="$.cookie('theme', 'skeleton')"&gt;Switch to Skeleton&lt;/a&gt;&lt;/p&gt;


But clicking the links, doesn't do anything, seems like I might be missing something or it might not quite work this way because href="#" doesn't actually reload the page if that was the actual idea...?
One way would be to nest each theme switching rule inside another rule using

system:cookie = theme=theme1

     Theme switching rule here


system:cookie = theme=theme2

     Another theme switching rule here


You will need to set up your theme switching links to create a cookie using your method of choice, PHP or jquery.cookie

An example using jquery.cookie could be something like:

template.php:

function THEMENAME_preprocess_page(&amp;$vars) {
  drupal_add_library('system', 'jquery.cookie');
}


Your theme switching links:

&lt;a href="#" onclick="jQuery.cookie('theme', 'theme1'); location.reload(); return false;"&gt;Switch to Theme1&lt;/a&gt;
&lt;a href="#" onclick="jQuery.cookie('theme', 'theme2'); location.reload(); return false;"&gt;Switch to Theme2&lt;/a&gt;


Keep in mind that this is not page caching friendly.  If you want this to work for anonymous users, you will need to disable page caching.