I'm trying to re-code our app into a single-page application.
For that I have written a php that does some access verification and then delivers the requested site's content via include
as an AJAX response.
This works, except for the js files.
A requested site's script tag looks like this:
<script src="/javascript/statistics.js"></script>
Which worked back when the site was not delivered via AJAX. But now it seems that '/' doesn't refer to the site root anymore? What's going on here? I'm not getting any errors either, the .js is just not included at all.
For reference, this very same-looking css included in the same file works fine and shows up as a GET request in console:
<link rel="stylesheet" type="text/css" href="/CSS/statistics.css" />
whereas the js isn't shown as requested in console.