i am confused by the concept of on-demand loading
I saw this blog post and was wondering if I could do the same with php using the ff. approach:
- check current url
- serve css or js based on current url
which may be done like this in Kohana
if (uri::segment(1) == 'search') // check current url
echo html::stylesheet('search.css'); // serve stylesheet
echo html::script('search.js'); // serve script
endif;
or am I getting the idea wrong?
a side question would be is ti alright to have a css file for each individual page aside from the site-wide forms.css and layout.css