Kinda dynamic page load (when you miss about a php)

A simple way to load file to html page (javascript/jquery) hipsters gonna hate this

19-09-2020 - 0 minutes, 41 seconds -

The idea is to take an url like "" get parameter "page" as a filename and then load the contents of the file into div. Everything is simple, but a little bit tricky (a relic of the time of WAP sites without a server language)

My weird idea requares a jQuery (place it in )

<script src=""></script>

Then we need to get our "filename" parameter from url

function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    return vars;
var pageID = getUrlVars()["page"];

Now we have a "filename" and we can load it (better place it )

if(pageID == null) {
    $('#content').load('//'); //if pageID is null (empty)
    $(function() {
    $(window).bind('hashchange', function() {
        var pageID = getUrlVars()["id"];

Don't forget about this :)

<a href="/?page=test">Test</a>