Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17763

Do browsers generate html tags based on content-type?

$
0
0

I had an issue at work where an improperly generated content-type header resulted in a javascript file which was sourced into a web app to actually be incorrectly rendered as an image. The HTML for the element, when inspected showed it was in fact in an <img src="js_file.js"> tag. The developer told me that chrome was creating that tag dynamically, based on the content-type header for that file. I guess I didn't realize that browsers actually generated any HTML on their own. Is that right? Will all browsers actually generate HTML dynamically in order to properly display content? Perhaps there are javascript functions which will create the right tag, that makes sense, but I didn't think the browser did any HTML generation on its own, am I wrong in thinking that?

submitted by gleventhal
[link][8 comments]

Viewing all articles
Browse latest Browse all 17763

Trending Articles