Is a url query parameter valid if it has no value?

前端 未结 8 1186
滥情空心
滥情空心 2020-11-28 05:41

Is a url like http://example.com/foo?bar valid?

I\'m looking for a link to something official that says one way or the other. A simple yes/no answer or

8条回答
  •  温柔的废话
    2020-11-28 05:53

    isindex deprecated magic name from HTML5

    This deprecated feature allows a form submission to generate such an URL, providing further evidence that it is valid for HTML. E.g.:

    generates an URL of type:

    ?bar
    

    Standard: https://www.w3.org/TR/html5/forms.html#naming-form-controls:-the-name-attribute

    isindex is however deprecated as mentioned at: https://stackoverflow.com/a/41689431/895245

提交回复
热议问题