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

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -