开发者

Does having a space char in a URI affect performance?

开发者 https://www.devze.com 2023-02-04 01:00 出处:网络
I know that modern browsers will allow URIs with spaces in them, and I imagine that there\'s some encoding/decoding going on that might not be there ot开发者_如何学编程herwise.

I know that modern browsers will allow URIs with spaces in them, and I imagine that there's some encoding/decoding going on that might not be there ot开发者_如何学编程herwise.

Are there any material performance impacts that can be attributed to having spaces in a URI?


As far as I know, browsers convert space to %20 so the server will not notice. In fact, in Firefox if you copy a URL that has spaces from the address bar it will be converted to %20.

Also, I think this is not worth pursuing. It would be really hard to measure the performance impact and it seems to be a really tiny part of the load anyway.

Also, the load would be on the PCs,,, not on your servers.

I (as a programmer writing code or links) would type %20 because it is safer (less likely to fail) and closer to what actually happens.

0

精彩评论

暂无评论...
验证码 换一张
取 消