If all my web pages have the same navigation and footer markup, what is the best way of avoid hard-coding this in every page, so if it needs changing it's only changed in one place so as not to have to edit every html file?
Thanks
If all my web pages have the same navigation and footer markup, what is the best way of avoid hard-coding this in every page, so if it needs changing it's only changed in one place so as not to have to edit every html file?
Thanks
A few options:
Use the AJAX load()
method.
$('#mysection').load('yourfile.html');
Of course the URL can also point to a PHP script etc.
You should use a server-side solution depending on the technology that are you using (PHP,ASP,etc...) I think you should take a look at this link.