Can META tags be conditional

// Expert user has replied.
D David Garratt 3 years 7 months ago
3 1 0

I have a customer who is working with a mix of hardware. For the Zebra wireless scanner I have a number of META tags at the top of the .jsp page and they work fine. However on a different non - Symbol scanner with a different browser one META tag actually causes an error to pop-up each time the browser loads the page.

I don't really want to have a duplicate set of web pages for each device type so I was wondering if there is some javascript which can either made the META tag conditional or maybe import a external file containing device specific meta tags based on some other condition.

I could use my servlet to set a session variable for the condition but I'm no sufficiently web savvy to know how do code it.

My META tags are in the HTML Header

The Enterprise Browser version is 1.8

Please Register or Login to post a reply

1 Replies

J Joydeep Chakraborty

Hi,
Please remove the metatag from the pages and add them from defaultmetatag feature in config.xml
Config.xml Reference - Zebra Technologies TechDocs
In that way your config.xml will have the metatag changes.

One thing to note, if you inject via default metatag this metatags will be applied to all pages in your application.
If you do not want that I will suggest dom inject the metatags depending on your url.

Regards,
Joydeep

CONTACT
Can’t find what you’re looking for?