diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 00fdfe85..3e44b3bb 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -4508,35 +4508,50 @@ } /* Are we going to go over the cookie limit of 4KiB? If so, try to delete a cookies - * belonging to DataTables. This is FAR from bullet proof + * belonging to DataTables. */ - var sOldName="", iOldTime=9999999999999; - var iLength = _fnReadCookie( sNameFile )!==null ? document.cookie.length : - sFullCookie.length + document.cookie.length; + var + aCookies =document.cookie.split(';'), + iNewCookieLen = sFullCookie.split(';')[0].length, + aOldCookies = []; - if ( iLength+10 > 4096 ) /* Magic 10 for padding */ + if ( iNewCookieLen+document.cookie.length+10 > 4096 ) /* Magic 10 for padding */ { - var aCookies =document.cookie.split(';'); for ( var i=0, iLen=aCookies.length ; i 4096 ) /* Magic 10 for padding */ + if ( iNewCookieLen+document.cookie.length+10 > 4096 ) /* Magic 10 for padding */ { - var aCookies =document.cookie.split(';'); for ( var i=0, iLen=aCookies.length ; i