Loading scripts at the end of the body and flexicontent

4 years 8 months ago #45339 by gkhn
Hi there,

The code below is loaded in the header section when I implement
<jdoc:include type="head" />
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/media/system/js/core.js" type="text/javascript"></script>
  <script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js" type="text/javascript"></script>
  <script src="/plugins/system/jqueryeasy/jquerynoconflict.js" type="text/javascript"></script>
 
 
  <script src="/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script>
  <script src="/media/jui/js/jquery.ui.core.min.js" type="text/javascript"></script>
  <script src="/media/jui/js/jquery.ui.sortable.min.js" type="text/javascript"></script>
  <script src="/media/jui/js/bootstrap.min.js" type="text/javascript"></script>

I was wondering if the flexicontent will have any problems if i load the scripts at the end of the body. How can I control these so that they actually load at the end of the body?

Thank you.

Please Log in or Create an account to join the conversation.

4 years 8 months ago #45341 by ggppdk
Hello

can you explain why you want this, if you have a "race-condition" = depends on what happens first,

then this is not the proper way to do it

Regards


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

4 years 8 months ago #45343 by gkhn
When I examined my site using gtmetrix, it performs really poorly.
So I need to modify the header output of joomla so that the scripts are not included. I will then place those scripts before </body> tag if that is going to be ok with flexicontent.
Would this affect the front end editing of flexi?

Please Log in or Create an account to join the conversation.

4 years 8 months ago #45347 by ggppdk
Hello

the frontend end should not be effected , as long as you move everything ...

e.g. if you call jQuery in head before JS file is loaded ... then there is a problem ...


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

4 years 8 months ago #45349 by gkhn

ggppdk wrote: Hello

the frontend end should not be effected , as long as you move everything ...

e.g. if you call jQuery in head before JS file is loaded ... then there is a problem ...


When I move the code below before the </body> tag
<jdoc:include type="head" />
</body>

I dont know why but the meta keywords and description and the document type are also moved. Is there a way to extract only the scripts so that I can still use the <jdoc:include type="head" /> between the head tags excluding the scripts?

Please Log in or Create an account to join the conversation.

4 years 8 months ago #45353 by ggppdk
Hello

I would suggest leaving that in the head,

about you site frontend, many things are can be done, most important are:


- use fast content component (FLEXIcontent is and supports fastest caching method: joomla page caching = enable joomla system cache plugin)
- use a CSS / JS compressor joomla extension (test which settings do not break your website)
- minimize image sizes !!
- use jQueryEasy to load jQuery from a common place like google (thus the users do not need to download it when they visit your website)


- (while browsing your site) if your site is large 10,000 items or more then turn-off FACETED filter behavior for FLEXIcontent filters (it is in each field configuration)


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

4 years 8 months ago #45442 by ggppdk
Hello

about moving these to the end,
yes what you ask is sensible,

just we have this:

if some small script inside your website is uses any of these files , then it will be executed before these files causing an error,

thus ALL JS needs to be moved to the end, which is easy to do , e.g. there maybe some custom fields or joomla content plugins that insert JS inside the body, in this case you will get a JS error


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.