How to change the title of the title tag and meta description according to the content


my web page is shaped by modules and I only have one cache, that is to say

        <meta name="description" content="ejemplo" />
     link1  link2   link3






the other content after the body I bring from other files with the super Global GET according to the link clicked, my question is how can I change the title and the description of the meta tag as brought with the variable $_GET["view"] .

this I need to improve the positioning of my page in google and that users find my page according to what they are looking for, some help plis? thanks

asked by andy gibbs 03.12.2018 в 19:37

1 answer


You would use something like (with JavaScript):

document.getElementsByTagName('meta')["description"].content = "Mi nueva descripción"; 
document.title = "Mi nuevo título"; 

Here is the answer on which I base myself to solve something similar that I implemented.


I hope my answer can help you out of something.

answered by 03.12.2018 в 19:56