Simple html img tag question

Does the file name in the srctag attribute have a imgcharacter limit? or compatibility issue between operating system (OS) browsers ...

eg:

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

no problem on this-is-a-very-long-image-filename-of-an-image-named-leaders-systems02.gifall OS browsers?

+5
source share
3 answers

You will be limited to the maximum URL length for the browser . The HTTP server may also send you HTTP 414 "Request URI" for too long. The standard does not define what size is, but allows the server to make such an answer.

From the HTTP / 1.1 standard S10.4.15 :

10.4.15 414 Request-URI Too Long

, Request-URI , . , , POST GET , URI " " (, URI , ) , Request-URI.

+3

URL- 2048 . . HTTP URI GET

+2

I doubt there is a problem with long attributes srcin any common browser. However, if you have a lot of very long attributes src, this can negatively affect load time.

+1
source

All Articles