When uploaded to a hosted server the following code is successfully turned to http://myexample.com/otherpartsofpath :
ajax: {
url: 'http://' + window.location.hostname + '/otherpartsofpath',
type: 'GET',
...
But when rendered on the local computer it gives an error. That's why in this case I should define the URL explicitly:
ajax: {
url: 'http://localhost:10930/otherpartsofpath',
type: 'GET',
...
How could I make the code to work locally without explicitly defined URL?