gpt4 book ai didi

html - 关于html img标签的简单问题

转载 作者:太空狗 更新时间:2023-10-29 15:52:41 24 4
gpt4 key购买 nike

img 标签的src 属性中的文件名是否有字符数限制?或操作系统 (OS) 浏览器之间的兼容性问题...

例如:

<img src="../img/misc/this-is-a-very-long-image-filename-of-an-image-named-leaders-systems02.gif" alt="Leaders Systems" class="emblem" />

this-is-a-very-long-image-filename-of-an-image-named-leaders-systems02.gif 在所有操作系统浏览器中都没有问题吗??

最佳答案

您将受到 the maximum URL length per browser 的约束. HTTP 服务器也可能会向您发送 HTTP 414“请求 URI 太长”。该标准并未规定此大小是多少,但允许服务器做出此类响应。

来自HTTP/1.1 standard S10.4.15 :

10.4.15 414 Request-URI Too Long

The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret. This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long query information, when the client has descended into a URI "black hole" of redirection (e.g., a redirected URI prefix that points to a suffix of itself), or when the server is under attack by a client attempting to exploit security holes present in some servers using fixed-length buffers for reading or manipulating the Request-URI.

关于html - 关于html img标签的简单问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3107197/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com