Load CSS files using PHP, based on page content -
is possible? example, i'm loading of css files through header. 1 of things i'm using jquery datatables plug-in. however, don't want load datatables css unless page content contains dom element of type "table". i've tried evaluating page with:
file_get_contents($_server["php_self"];
which doesn't work. what's efficient way evaluate page's content in php, , load css files appropriately? or, javascript better way this?
i you're on thinking this. set far away cache expiration date on datatable css , let user cache css file.
Comments
Post a Comment