Which is the better way to add dynamic meta tags in aspx page? jquery,ajax and javascript OR on pageLoad (server side)?

StackOverflow https://stackoverflow.com/questions/20628601

  •  02-09-2022
  •  | 
  •  

Question

I want to add dynamic meta tags on aspx page. Here I am confused between client side (using ajax call) and server side.

Which way is effective? I saw more examples of adding dynamics meta tags from server side on page load.

Thanks,

Était-ce utile?

La solution

You should add the meta tags server-side.

Meta tags are usually used to describe the content of the page for various kinds of robots (search engine, Facebook share button, ...), or send additional info about the page to the browser (rendering mode for IE, charset declaration). Most of that functionality will not work - could not work - if you add meta tags through client-side script.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top