If you're talking about server-side session then it really depends on the server-side.
It should assign you a session id, usually through a cookie....
That means you could for example make an ajax request to a designated url in your server, specifying the required session id. That ajax request would then assign the session through a cookie.
Another idea would be to actively create a cookie (again, if server supports that) on the client-side with JavaScript with specific session id, i.e
$.cookie("SESSION", "session-id"); // Using jQuery
Although I've never tried that before.
Note above that the cookie's name depends on your server technology (Tomcat is JSESSIONID
by default [link], ASP.NET is ASP.NET_SessionId
[link], under "Note").