Skip to content
Permalink
Browse files
IE doesn't seem to like caching fragments that have options in them. …
…Ticket #4883.
  • Loading branch information
jeresig committed Jul 11, 2009
1 parent 0c4418b commit 5b84c7c45c8c3c5e7c9a17239cd658b0c87ab892
Showing 1 changed file with 1 addition and 1 deletion.
@@ -140,7 +140,7 @@ jQuery.fn.extend({
var fragment, scripts, cacheable, cached, cacheresults, first;

if ( this[0] ) {
if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 ) {
if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && args[0].indexOf("<option") < 0 ) {
cacheable = true;
cacheresults = jQuery.fragments[ args[0] ];
if ( cacheresults ) {

2 comments on commit 5b84c7c

@jdalton
Copy link
Member

@jdalton jdalton commented on 5b84c7c Sep 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you remember any more details about this? Was the issue only if it was a single element or within other elements ?

@dmethvin
Copy link
Member

@dmethvin dmethvin commented on 5b84c7c Sep 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the same issue dealt with in jQuery.clean? IE doesn't like bare elements to be assigned to innerHTML so they're wrapped in a which is later stripped.

Please sign in to comment.