SSL Labs ScoreSecurityHeaders.io ScoreHSTS Preloaded

Log in to participate

There is no cost to join RicheyWeb, and membership is a requirement to submit bug reports and participate in the support forums.

JS file not loading?

More
8 months 4 days ago #3784 by jjnxpct
JS file not loading? was created by jjnxpct
Hi! On one of our sites it seems like tje JS file(s) set in the head tag is not loading on the site. I do not see any js loaded in the site source code. The functions added to this js are not working.

When we disable the JCH optimize plugin the js file does load / work.

Any thoughts on this? I will also ask the developer of JCH Optimize about this.

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

More
8 months 4 days ago #3785 by jjnxpct
Replied by jjnxpct on topic JS file not loading?
I figured out there is a setting in JCH optimize that causes the js file to disappear:
'Position javascript at the bottom of page'

When this option is activated the js files are not placed anywhere. They should be on the bottom... I have contacted the developer about this. Maybe it's a bug in that plugin or my template cases this. Not sure yet...

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

More
8 months 4 days ago #3787 by jjnxpct
Replied by jjnxpct on topic JS file not loading?
Ai, figured it out. I put some HTML code after the closing </body> tag. Stupid! this cause the JCH plugin to fail placing the js tags at the bottom...

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

More
8 months 2 days ago #3791 by michael
Replied by michael on topic JS file not loading?
Glad you figured it out! I started at the top and was scratching my head because I haven't used jchoptimize (I have significant "Not-Invented-Here" issues).

Try out "System - Bundler" and "System - HTTP/2 Push" (if your server supports HTTP/2 and Push)

www.richeyweb.com/software/joomla/plugins/174-system-bundler
www.richeyweb.com/software/joomla/plugin...1-system-http-2-push

They're both running here and they work great.

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

More
7 months 4 weeks ago #3796 by jjnxpct
Replied by jjnxpct on topic JS file not loading?
Hi Michael, thanks for pointing me to these plugins.

JCH Optimize is a pretty nice and extensive tool if you know how to use it. So I think I will stick to that for now ;-) But the System HTTP/2 plugin might be a very nice addition to that. Or server does support it. I already tried the plugin on our own company site and it seems to work fine.

I am not sure how I can see (in the browser / inspector) what is different with the plugin turned on and off?

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

More
7 months 4 weeks ago #3798 by jjnxpct
Replied by jjnxpct on topic JS file not loading?
Just watched your video on this plugin. I am looking for way to check the pushed files on Windows 10 like you did on the Mac. That way I can actually see what is pushed and what's not. But I think I can probably find a tool for that.

I do have another question: I mentioned I use JCH to optimize the loading of CSS and s scripts. I am not sure if the files taht are combined by this plugin - and added to the html - are pushed by the http2 push plugin? I guess the plugin ordering might be important for this to work?

This will also affect the way we put the scripts in the 'Advanced' tab of the plugin I guess.

JCH produces css and js file slike this:
/media/plg_jchoptimize/cache/css/ec82da05ab12cf6233ad17c21254aa8d_0.css
/media/plg_jchoptimize/cache/js/cee16e8c4321f7b90e2fbe6f052192a0_0.js

Thes files are cached and will change when the cache is cleaned and new files are created. So how would we push those? Or should we then use the main plugin buttons'Javascript' and 'Stylesheets' of the plugin and let the plugin look for these files? There will be only a few because most css and js files are combined by the JCH plugin.

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Powered by Kunena Forum