admin管理员组文章数量:1298180
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?
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?
Share Improve this question edited Jan 30, 2012 at 14:09 Shawn Chin 87k20 gold badges167 silver badges193 bronze badges asked Jan 30, 2012 at 14:07 megasmegas 21.8k12 gold badges82 silver badges134 bronze badges3 Answers
Reset to default 6The ?
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 ining 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 mon to just specify some value in the query string.
"?" is the separator for supplying arguments via a GET request.
? states you're providing arguments via HTTP GET.
For example if you want to send a=1 and b=2 , you would do http://mysite./myfile.php?a=1&b=2
Shai.
本文标签: javascriptWhat does the question mark at the end of filenames meanStack Overflow
版权声明:本文标题:javascript - What does the question mark at the end of filenames mean? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741329334a2372678.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论