-
AuthorPosts
-
portalion Friend
portalion
- Join date:
- October 2009
- Posts:
- 63
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 11
- Thanked:
- 2 times in 1 posts
November 5, 2013 at 6:42 pm #192005Hi,
I would like to receive assistance in putting async atribute in <script….> in HEAD section of webpage.I have 2 scripts i’d like to load asynchronously:
First:
Currently in my sourcecode it looks like this:
<script src=”/index.php?jat3action=gzip&jat3type=js&jat3file=t3-assets%2Fjs_2d219.js” type=”text/javascript”></script>and I would like it to look like this:
<script async src=”/index.php?jat3action=gzip&jat3type=js&jat3file=t3-assets%2Fjs_2d219.js” type=”text/javascript”></script>Second
<script type=”text/javascript” src=”http://www.website.com/plugins/content/sige/plugin_sige/milkbox.js”></script>and I would like it to look like this:
<script async type=”text/javascript” src=”http://www.website.com/plugins/content/sige/plugin_sige/milkbox.js”></script>Where are the files to modify?
Looking forward
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
November 7, 2013 at 8:48 am #511430Hi portalion,
You can try this way:
– Copy file: pluginssystemjat3jat3base-themesdefaultpagedefault.php
– Paste it into template folder: templatesja_teline_ivpage (if there is no ‘page‘ folder, you can create it)
– Add your own script in Head section of this file.
Once done, remember to clean JAT3 cache.
Hope this helps.
portalion Friendportalion
- Join date:
- October 2009
- Posts:
- 63
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 11
- Thanked:
- 2 times in 1 posts
November 8, 2013 at 6:22 pm #511662Hi Saguaros
I suppose I must have put my requst in the wrong way.
I will try to put it clearer:In the sourcecode of my webpage (in the browser) in HEAD section I may notice two lines of code I want to change.
These lines are generated automaticaly by Joomla.
Here they are:[PHP]<script src=”/index.php?jat3action=gzip&jat3type=js&jat3file=t3-assets%2Fjs_2d219.js” type=”text/javascript”></script>[/PHP]
[PHP]<script type=”text/javascript” src=”http://www.website.com/plugins/content/sige/plugin_sige/milkbox.js”></script>[/PHP]I want to change these lines of code to look like this:
[PHP]<script async src=”/index.php?jat3action=gzip&jat3type=js&jat3file=t3-assets%2Fjs_2d219.js” type=”text/javascript”></script>[/PHP]
[PHP]<script async type=”text/javascript” src=”http://www.website.com/plugins/content/sige/plugin_sige/milkbox.js”></script>[/PHP]This means I want Joomla to add “async” to these lines while generating webpage code.
May you come up with any solution?
Looking forward
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
November 14, 2013 at 1:59 am #512138Hi portalion,
Actually, you should add ‘async=”async”‘, pls open file: pluginssystemjat3jat3corehead.php
At line 187:
[PHP]$document->addScript($url[1]);[/PHP]change it to:
[PHP] $document->addScript($url[1], “text/javascript”, false, true);[/PHP]
Then clean JAT3 cache.
Hope this helps.
-
AuthorPosts
This topic contains 4 replies, has 2 voices, and was last updated by Saguaros 11 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum