Forum Discussion
Can we also upload the .js file and font files such as .ttf etc and call them in the wrapper head? if so, how?
Thanks
Gursimrat
Hi Gursimrat,
absolutely. You can use the Asset Library in Studio to upload and serve these files. There is the asset.get method that will help you out with that - files served in this way will also benefit from our CDN. If you are not sure about the upload function, have a look here.
If you are planning to use custom fonts (as it seems from your message) I strongly reccommend uploading them in our asset library - as some browsers (IE and FF) are quite strict with cross domain policies and would refuse to load them if they are not served from the same domain.
Hope that helps,
- Gursimrat12 years agoLeader
Great, so I am importing the js files like this in my wrapper Head
<script src="${asset.get("/html/assets/color_box.js")}"></script>
and font files like this
<script src="${asset.get("/html/assets/case-font.ttf")}"></script>
Is it correct?
- PaoloT12 years agoLithium Alumni (Retired)Yes - that should be okay and make use of the CDN.