I'm wondering why PHP can't fetch an url variable with the $_GET["var"]
that has been set by the JS window.history.pushState()
earlier. I do know that the PHP code get's executed by the server, but the JS does actually get executed first in my case. Because the pushState is being called before an ajax fetches the PHP code that is supposed to get the url.
I have checked and tested all of this:
The pushstate changes the url to what i want it to
The PHP script get's executed when the ajax is called ( which is after the pushState()
)
The PHP can fetch a url when it's not set by the pushState()
I'm not using any framework of any kind