Reputation: 6868
In a framework template engine let's say we have files for header,body,footer and body itself contains banner.tpl.php, content.tpl.php and so on. Do browsers cache these inner files?
If answer is negative what is the benefit of that? Do we can cache server side? Or it doesn't at all relate to caching?
Upvotes: 0
Views: 40
Reputation: 7655
Your php header files are only known by the server which will not send them 'as is' to the browser. The browser will have an html version of them with all variables placeholder replaced by their actual values. So the answer is no.
The benefit of templates is to separate the presentation from the process of computing what it will contain, it is not related to caching imho. Except for persistent servers (java, not php) which can cache (depending on the template engine) the content of template files, reuse them across queries and users.
Upvotes: 1