Friday 24 May 2019

How to add compatibility Meta Tags in Pega

How to add compatibility Meta Tags in Pega


In this post will see how to add compatibility meta tag in head tag.

For Clear Understanding about Meta Tag Please refer this link

Now in this post we are going to add the below meta tag to Html head tag.

<meta http-equiv="x-ua-compatible" content="IE=edge"> 


Look at the above two screenshot. I inspected Case worker portal and within the head tag there is no Meta tag like http-equiv="x-ua-compatible".

In pega there is an option to add JS file in Harness. In harness open scripts and style tab.

Here add a new JS File and open that js file and paste below code in that file.

var meta = document.createElement('meta');
meta.httpEquiv = "X-UA-Compatible";
meta.content = "IE=edge";
document.getElementsByTagName('head')[0].appendChild(meta);
Functionality of this code is to add append meta tag to head tag.

Save the JS File and harness . Refresh the harness and check whether new Meta Tag is added or Not using Inspect element.

6 comments:

  1. Hi Bro
    What is the purpose of the meta data in Harness rule, if not use what is the issue. can you please explain details.

    ReplyDelete
    Replies
    1. Hi Bro,
      Meta tag is a one of the html tag. It has define some functionality in this tag. Please check below URL for more understanding about this tag.

      https://www.w3schools.com/tags/tag_meta.asp

      Thanks,
      Bharathan.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Good Article you know your article it's useful me and Thanks for Sharing Information.
    web designing course in chennai

    ReplyDelete
  4. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! the Zodiac

    ReplyDelete
  5. Very nice Blog The points really are helpful thanks for sharing. your valuable content on How to add compatibility Meta Tags in Pega with us in suck an easy and understandable manner. SEO services in Jaipur helps you rank higher in search results and garner more visibility online, making potential customers more likely to click over to your site and convert. please write for seo Benefits for e-commerce websites to get more sales.

    ReplyDelete