我的文档结构:动态更改元/ title标签,根据页面上的JS
<?
include('head.php');
include('header.php');
include('index_content.php');
include('footer.php');
include('form.php');
include('js.php');
?>
当我创建了新的一页,我用这个骨架只改变页面的内容。但对于SEO优化,它也有必要改变标题和元标签。根据页面,是否可以使用JavaScript动态更改此设置。或者是最好不要洗澡,写这样的事:
<?
include('head.php'); //beginning of the <head> tag
?>
<title>Some title</title>
<meta name="description" content="some description">
<meta name="keywords" content="some keywords">
<?
include('header.php'); - //end of </head> tag
include('index_content.php');
include('footer.php');
include('form.php');
include('js.php');
?>
广东话你'“>'? – Hemal
您是否使用页面内容或静态页面的数据库? –
我用https://prerender.io/在我的案例中 –