Hi I was just wondering if there is any way that using a .php file extension over a .html extension impacts on the site performance, how the server handles it, etc.
I’m asking this because I want to include the layout and footer that’s on every page on my site using phps include. However this means making every page on the site have a .php extension, so is this bad in anyway or does it not matter?
Thanks
The extension in and of itself is irrelevant. How it’s processed server-side, which is usually, but not always, tied to an extension will have an affect. That said, PHP will tend to be a bit slower, not accounting for caching — or assuming both static and dynamic pages are cached equally.
That said, leveraging a server-side scripting language like PHP is a widely-accepted way to accomplish what you need. The performance hit will be negligible, especially in comparison to the development time savings of maintaining N pages with identical content.