Skip to Content
Author's profile photo Selvakumar S

Javascript to change the portal title or to add meta tags

In some situation you may want to change the title of the portal page. OR you may want to change the link, meta tags, etc..

One way to do is to identify the correct place where you have to change this, and make it work. Say for example, changing the title of SAP EP, will change title in all portal pages. If you don’t want to change system wide, and only you want to change it in particular page, you can follow this example.

In my requirement, I had to change my Logo, text’s in portal logon page. For that i developed/deployed the custom logon on page from the standard war files.

And used these commands to make it work.

Added these (below mentioned commands) java-script commands in <script></script> section of the logon.jsp / logonmobile.jsp files.

In this case i was not able to locate the <head></head> tag in my page, because it was getting derived from EP framework level.

To change Title of the logon page :

document.title = “My title”;

And to Add link element in head section of the html page i used this command.

var l1 = document.createElement(“link”);

l1.rel = “icon”;

l1.sizes = “196×196”;

l1.href = “<%=webpath%>layout/android-touch-icon-Mobility-196×196.png”;


To Add Meta tag

var m1 = document.createElement(“meta”); = “mobile-web-app-capable”;

m1.content = “yes”;


To know the details about why you have to add such tag’s, you can find it in this links:

For Apple – Mobile WebApp :

For Andriod

Similar way, you can also change the favicon

Refer this page for details about it :

Other useful links :

5 Tips for Turning Your Website Into an iOS Web… – Chief Creative Mechanic

In this case i was not able to locate the <head></head> tag in my page, because it was getting derived from EP framework level. So i had to use the above mentioned method of adding, link, meta tags to the <head> section of the page.

In some other case, (Say in Fiori home page, launchpad page,) you want to add such details, you can directly add them as per the or links given above.

Hope this helps to create custom bookmark of SAP portal logon in Android, iOS and other mobile apps, and web-browser bookmarks with custom pictures.

Thanks for reading.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Ravi Maheshwari
      Ravi Maheshwari

      We can also change portal title from Config tool. We just did it yesterday. 🙂


      Ravi Maheshwari

      Author's profile photo Sridhar k
      Sridhar k

      Hello Ravi,

      Can you please let me know how you have changed for Fiori Launch Pad? Is there any property to change Similar to portal text - portal.html.head.title