Show with an example how to fill in the values ​​of the following tags with JS or jQuery:

<title></title> <meta name="description" content="" /> <meta name="keywords" content="" /> 
  • Why do you want to fill them with javascript? - Grundy
  • when you go to another page of the site, only the page content is loaded, the contents of <head> are loaded as a universal template for all pages - GTX1024
  • Are you sure that everything will be properly indexed? If you simply overload the content of the page with an AJAX - are you sure that the robot will go, what is another page? - br3t
  • Pages Ajax I Do Not Reboot - GTX1024

1 answer 1

 <script type="text/javascript"> $(document).ready(function() { document.title = 'Ваш title страницы'; }); </script> 

Short

 $(document).prop('title', 'test'); 

For description:

 document.querySelector('meta[name="description"]').setAttribute("content", _desc); 

There are some doubts about the indexing of the whole business by various search engines. If your page is overloaded in some way, you can use this method for everything else.