160
Views
2
Comments
Solved
How to include manifest on mobile app page head?
Question

Hi,

I need to include <link rel="manifest" href="/manifest.json"> tag on page header on our mobile app. I've used AddLinkTag server action in Oninitilalize but it doesn't appear on page header at all. Is this function works on mobile apps or there is another way to include custom links in header? 

Thank you

2019-09-30 07-35-56
Aurelio Junior
Solution

Hi Mykola,

You could do it using jQuery. Create a new script in your module with the following code:

$(document).ready(function() {
   $('head').append('<link rel="manifest" href="/manifest.json">');
});

Then set it as a required script in your screen.

Of course, you're also gonna have to add jQuery as a required script, if you haven't done it already. Make sure to add it before the script above in the screen's required scripts list.

2021-05-05 13-05-18
Mykola (Nick) Tkachenko

Thank you very much Aurelio ! it solved the problem.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.