How can I update multiple pages when editing one page? For example, I am editing index.html, and I am changing its footer (which all other pages have). When I change the footer I want the other pages on my domain to be updated as well. Thanks!
Share
This is a major reason why platforms like PHP and ASP.NET exist; they can help you dynamically generate HTML containing common sections like headers and footers that are defined in one place. One simple alternative that may be available for you is Server Side Includes.
Update:
Since you said you’re using PHP, rather than having pages with the
.htmlextension, you should write your pages in PHP. That way, you can include separate files containing your headers and footers in each page, so any changes to those only have to be done in one place, i.e.: