Common Header / Footer with static HTML

2019-01-02 15:30发布

Is there a decent way with static HTML/XHTML to create common header/footer files to be displayed on each page of a site? I know you can obviously do this with PHP or server side directives, but is there any way of doing this with absolutely no dependencies on the server stitching everything together for you?

Edit: All very good answers and was what I expected. HTML is static, period. No real way to change that without something running server side or client side. I've found that Server Side Includes seem to be my best option as they are very simple and don't require scripting.

标签: html
13条回答
美炸的是我
2楼-- · 2019-01-02 16:33

No. Static HTML files don't change. You could potentially do this with some fancy Javascript AJAXy solution but that would be bad.

查看更多
登录 后发表回答