#815 – Route 66 Script Code

Status: Closed - Category: Route 66
Hi All,
I have been a user of Route 66 for some time but I have only really paid attention to the details after upgrading from Joomla 3.x to 4.x. If I enable the whole Route 66 package on the back end of my site and then visit my home page and view source, I can see that there is an enormous block of code within the <head> section of the page. I'm no programmer but it might be CSS. I can prove it is inserted by Route 66 in two ways; firstly if I disable Route 66 in the back end, all of the the code disappears and secondly, the code is bounded by the following <script defer src="/media/route66/scripts/6815f3c697c45a94b802f3758c05bdf1.js?v=1641827231"> </script><style> and </style>.

I don't want to post the code here because it is huge. It has 6000 words and runs to 59 pages of A4.

I can't recall seeing this on my site prior to upgrading to Joomla 4.x. Is this expected behaviour? It seems to me that it may be causing the page's slow loading time with that much code on it.

Can anyone shed any light on this? If you need to see the code, please let me know how best to upload a copy.

Kind regards,
Norrie
Hi Norrie,

Yes this is the expected behaviour. Route 66 will try to optimise your CSS and Javascript. You can enable or disable this functionality using the component options under the "Google PageSpeed" tab.

In short, Route 66 will minify your CSS files and embed the code in your page. It will also combine all your inline scripts into an external script and load it using defer.
In order to see if Route 66 improves your site's performance you can use the PageSpeed Insights tool by Google which is available at https://pagespeed.web.dev/
You can test both with optimisations enabled and disabled and see if that makes any difference. Just remember to clean your site's cache after changing the settings each time.

It would be very helpful if you could post a URL to the page so I can ensure that there is no issue with Route 66 and it just adds the code that your site is already using.

Regards
 
Hi Lefteris,
Thanks for your detailed response. it is very much appreciated.
I didn't realise that Route 66 minified CSS. I recently installed another extension for that purpose (JCH Optimise). I will now uninstall it so that they don't collide with each other. I am pleased to hear that the code in the page is expected. If you have time, I would appreciate if you could check that it is working as intended. The URL is callidusdesign.co.uk.
Kind regards,
Norrie
There is no need to uninstall JCH Optimise. If you prefer it over Route 66 you can keep using it. In that case, just make sure to disable Route 66 optimisations in the component options.
I took a look at your site. The javascript optimisation seems to works fine. The CSS optimisation seems to be disabled at the moment.

Regards
 
Hi Lefteris,
Thanks again. I have uninstalled JCH anyway. I only installed it because an online SEO checker said that I had not minified the CSS. I didn't realise Route 66 did that. now that I know this, I don't need JCH any more.
I have checked the Route 66 settings on Googl PageSpeed and the Optimise CSS and Minify CSS switches are both set to "YES". Is there anything else I could check?
Kind regards,
Norrie
Hi Norrie,

There is always room for improvement but you should be fine for now. I checked a couple of pages in Google PageSpeed Insights and they scored well.
I still don't see CSS code embeded in your page so probably the CSS optimisation is not working. Is there a chance that you have disabled any Route 66 plugins?

Regards
 
Hi Lefteris,
I can confirm that all the Route 66 Plugins are active. Is there anything else I should check?
Kind regards,
Norrie
Hi Norrie,

Just realised that the only CSS file of your site is already lazy loaded, that's why Route 66 ignores it. I am not sure if it's your template or an extension doing this.
In any case, I don't think you should take any action, it's good as it is. It scores very well in PageSpeed Insights.

Regards
 
Hi Lefteris,
That's great. Thanks for letting me know and for all your help.
Kind regards,
Norrie
You are welcome.
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

Note: An active subscription is required in order to get support for our paid extensions. For our free extensions, if you don't have an account, register and then submit your support request.  In case you just want to ask a question, you can also use the contact form .

Note: Our support team is currently on vacation, so please anticipate slightly longer response times. Thank you for your understanding!

Firecoders
Are you using our extensions? Please post a review at the Joomla extensions directory!
Post a review