java script snippet for responsive

Java
window.location.href = "http://mywebsite.com/home.html";
Source

Also in Java: