IE: Undocumented "cache" attribute defined for input elements?

Posted by aefxx on Stack Overflow See other posts from Stack Overflow or by aefxx
Published on 2010-02-17T11:22:34Z Indexed on 2010/03/20 15:01 UTC
Read the original article Hit count: 363

Hi everybody.

I've stumpled upon a strange behavior in IE(6/7/8) that drives me nuts. Given the following markup:

<input type="text" value="foo" class="bar" cache="yes" send="no" />

Please note that the cache attribute is set to yes. However IE somehow manages to change the attributes value to cache="cache" when rendering the DOM.

So, I wonder, is there an undocumented feature that I'm not aware of? I've googled about an hour now but couldn't find any info on this (not even on MSDN).

NOTE
I'm aware that adding custom attributes is non-standard compliant and that boolean attributes should be noted as attribute="attribute. Nevertheless I have to cope with these as they were introduced long before I joined the team. These custom attributes are used in conjunction with javascript to provide a more user friendly approach to form handling (and it works out quite well with Firefox/Safari/Opera/Chrome).

I know that I could simply convert these custom attributes to x-data attributes that will be introduced with HTML5 but that would take me several hours of extra work - sigh.

Hope, I made myself clear. Thanks in advance.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about dom