rsinayev
10 years agoContributor
Adding Javascript to a page HEAD
We’re trying to add some custom javascript to all of the pages on our Lithium site. We’ve built a custom component, added the code, and added the compontent to the appropriate pages. The problem is that for all the locations we can add it to, it will end up embedded deep within a DIV structure. Due to modern browser XSS prevention techniques, such scripts just get ignored by the browser. So Is there a way to add javascript, either with a component, or with some other means, that will end up in the “HEAD” of the document, or at the very least, the root level of the BODY.
Has anyone else found a reliable way to embed static trusted javascript on one or more pages?
- Hey
If you need to add to all pages, have you looked at adding to the head or hitbox within the skin wrapper from studio? You could dump the code in there and it should display on every page.