#
# E.G on website http://www.test.com/page.php&load=welcome
# push states would require you to build the url with any GET
# params you require what happens if the params list is huge.
#
// _GET contains any GET Params used by the page
console.log(_GET);
// will result in Object {load: "welcome"}
//if you would like to append any other GET Params just add them
_GET['title'] = "Hello";
_GET.content = "World";
console.log(_GET);
// will result in Object {load: "welcome", title:"Hello", content:"World"}
//to then push the push state without changing
//the page in the url
pushStateGen.push();
// or if you would view the generated address
pushStateGen.getPushURL();
// if you would like to change the page in the url
// so for our example above page.php
pushStateGen.push("/page2.php");
// or if you would view the generated address
pushStateGen.getPushURL("/page2.php");
//and these work with all manner of urls that would work on a href
// more Examples below
# say we're on path http://www.test.com/test/page.php&load=welcome
pushStateGen.push("/page.php");
# this would return you to the top url
pushStateGen.push("http://www.test.com/test/page.php");
# this would push to the url entered however this will not work cross domain, port or protcol (https/http)
pushStateGen.push("../page.php");
# this would return you to the top url
|