CDN with fallback
CDN with fallback
sleepingtiger
Posts: 13Questions: 8Answers: 0
(sorry allan for so many stupid posts)
two points:
- The css files in CDN should have images embedded i think (base64) so i could take advantage of CDN otherwise paths reference locally...
- Please confirm that the following would be a good solution to fallback locally if cdn not working:
<link rel="stylesheet" type="text/css" href="<%=this.ResolveUrl("~/Controls/Dashboard/JS/DataTable/css/jquery.dataTables.css") %>"><br />
<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.2/js/jquery.dataTables.js"></script>
<script type="text/javascript">
jQuery.fn.dataTable || document.write('<script type="text/javascript" src="<%=this.ResolveUrl("~/Controls/Dashboard/JS/DataTable/jquery.dataTables.min.js") %>"></script>')
</script>
This discussion has been closed.
Answers
Hi,
Yes. I've avoided doing that for compatibility with IE6 and 7 which are still supported in DataTables 1.10 (although support will be removed in v1.11). I will look into providing a star hack version of the CSS with this.
CSS paths are local to the imported url.
Looks fine to me.
Allan