Search code examples
htmlhttp-headersrequestkeywordmeta-key

What is [@requested = 1] in a meta tag?


I found a snippet of code on a website that i have never seem before. I searched and couldn't find an answer for it, and even tried contacting the webmaster... So lets see if someone here can. It is a meta tag that says "seo/seo[@requested = 1]/metakeys

<meta name="keywords" content="seo/seo[@requested = 1]/metadescription">
<meta name="keywords" content="seo/seo[@requested = 1]/metakeys">

Solution

  • seo/seo[@requested = 1]/metakeys is an XPath query. XPath is a query language designed to extract information from XML documents.

    Presumably, the value for that attribute is supposed fetched from an XML document when the page is generated, but a bug causes the XPath to be included in the (X)HTML instead of the results of the query.