Forum Moderators: open
I have a site using PHP - the META tage are automatically generated, but I wanted to 'hard code' them. I haven't allocated my text to a variable, so the end result is my hard-coded tags, followed by auto-generated ones:
<title>My text here</title>
<meta name="keywords" content="My text here">
<meta name="description" content="My text here
<!-- BOF: Generated Meta Tags -->
<META NAME="Reply-to" CONTENT="">
<META NAME="Description" Content=" ">
<META NAME="Keywords" CONTENT=" ">
<title> </title>
<!-- EOF: Generated Meta Tags -->
My question is, will the empty second set of tags 'replace', or cancel out the first set? Do I need to worry, or just leave it as it is?
Many thanks for any feedback.
Jon
My question is, will the empty second set of tags 'replace', or cancel out the first set?
There's no standard answer to that - the markup specification would suggest (in so far as I recall) that you're only supposed to have one of each, so when you have multiple elements there is no "default" way to handle it.
When the rules can't be applied directly you run the risk of a search engine (or more accurately whoever coded that module for them) mis-interpretting your data as they attempt to "correct" your error on-the-fly so they can slot it into their model for storing & interpretting data. Since this would be proprietory code rather than implementing a standard you run the risk of each implementation being subtly different.
You've also missed a 3rd option: the data from the duplicate tags could be merged together to form one set of data.
If it was me, I'd decide whether the hardcoded data or generated data had priority (or whether they should be merged) and then recode so that only one set of metatags were included, primarily to avoid your current dilema, but also to cut down on wasted on-page space.
- Tony