In some project I’ve met these lines:
$.get("defaults/data.json?", ...);
$.get("defaults/structure.html?", ...);
$.get("defaults/style.css?", ...);
On server side these files without any extra symbols, so
I’m wondering what does the question mark at the end of files mean?
The
?in a URL denotes the start of the query string. A?at the end with no variables following it is usually an unnecessary way of saying “this has absolutely no querystring”.It would be possible with a URL rewriting engine for example, to examine the incoming REQUEST_URI to see if it ends with
?and take a different action than requests not ending in?, but that would be an unusual usage. It would much more common to just specify some value in the query string.