I happened to notice in my application that the copy_csv_xls_pdf.swf is getting called three times when datatables/tabletools are invoked. I put together a jsfiddle which (sometimes) illustrates the issue:
The same behavior can be observed from the TableTools documentation:
This behaviour is particularly problematic because the intial load of the file doesn't seem to be cached by the browser for the subsequent loads during that same request.
There seems to be a request to this file for each button that is "powered" by the SWF.
Still, why is this file getting loaded multiple times? Is it necessary? How can it be prevented (while still providing the same functionality)?
Ignore the following unnecessary code....
...which is only provided so that SO will allow me to include the link to the jsfiddle:
$('#browser_data').dataTable({
"bPaginate": false,
"bAutoWidth": false,
"bLengthChange": false,
"sDom": "<'row-fluid'<'span6'f><'span6'<'pull-right'T>>r>t",
"oTableTools": {
"aButtons": [ "copy", "xls", "pdf" ],
"sSwfPath": "http://datatables.net/release-datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
}
});