After i finished the mobile version of my website i used the https://github.com/sebarmeli/JS-Redirection-Mobile-Site to make the redirection to mobile site and also the redirection to the full site. Also i am using the cookie function to save the state for 1 hour using the code bellow:
<script>
SA.redirection_mobile ({
noredirection_param : "noredirection",
mobile_prefix : "m",
cookie_hours : "1"
});
</script>
The problem that i have is that i use subdomains in my site and when i came back to full site if i click to a link for example news.site.com/cat1/news1 or video.site.com/video1 the redirection goes back to mobile site because cookie is created for www.site.com site the redirection is www.site.com/noredirection=true.
Any idea how to solve this?