Adding render java script in RSD -...

User 2765857 Photo


Registered User
614 posts

Hello all, This has me confused :rolleyes: in regard to the Google and WI render-blocking in our RSD site. It recommends some JS Scripts load later so Above Fold loads faster?? Is this something that most of the CC Experts do? Any help or suggestions is appreciated. I used WI and PageInsght checking the RSD 1.5 site.
Ray
Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"
User 122279 Photo


Senior Advisor
14,651 posts
Online Now

It has become common practice to put all the js, files or scripts, close to the end of a web page, like the footer. That way the other contents will load before the js kicks in.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2765857 Photo


Registered User
614 posts

Thanks Inger I appreciate the input (as always),

Adding JS Scripts "Above Fold" to load faster is something I have been trying to figure out. I see what you are saying about adding it to end of /body area in place of header. I would think I would not add this to bottom or would I?????
<script type="text/javascript" src="MENU-KS-81615 1100AM/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="MENU-KS-81615 1100AM/js/modernizr-2.6.2-respond-1.1.0.min.js"></script>
<script type="text/javascript" src="MENU-KS-81615 1100AM/js/tinynav.js"></script>
<script type="text/javascript" src="MENU-KS-81615 1100AM/js/mb.js"></script>
The Test shows that I have 5 external JS files and that can make the site load slower?

On another note: I checked some other sites and was surprised to see that a lot have the same suggestion, wondering why if some web designer experts that make some really GREAT sites also have the rendering and above the fold suggestions from W-Insight and or Google P-Insight.

How are things on the home front???
Ray

Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"
User 187934 Photo


Senior Advisor
20,271 posts

JS scripts typically should be placed at the bottom. It doesn't always work that way when you have a page that's heavily depended on custom scripts for users. I have a app that has them both in the top and the bottom but I also included a script to cover the page until everything has loaded. Don't worry about it so much and do what works for your page.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2765857 Photo


Registered User
614 posts

Eric Rohloff wrote:
JS scripts typically should be placed at the bottom. It doesn't always work that way when you have a page that's heavily depended on custom scripts for users. I have a app that has them both in the top and the bottom but I also included a script to cover the page until everything has loaded. Don't worry about it so much and do what works for your page.

Eric in other words "If it ain't broke - don't touch it" with my luck if I start messing with it I will "Broke it" :rolleyes:

But.... still would like to see what can be done if anything :)

Thanks,
Ray
Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"
User 122279 Photo


Senior Advisor
14,651 posts
Online Now

It's not too long ago that a website started needing a lot of scripts and css files. Earlier it used to be one of each, and my guess is, that some web designers haven't broken the habit of popping everything into the document head.

But with the responsive pages, the Bootstrap, Foundation and all the other grid systems, plus page elements from 'every corner of the world' with their own set of files and folders, the 'workload' for the browsers to render a web page has become much, much more than it used to be. So it's a good idea to comply with the Google page speed recommendations.

You can't do much with external scripts, though. If they are hosted by e.g. Bootstrap or Foundation in a repository, they can be downloaded so that they also become local scripts, but that is not always a good thing to do, as those repositories usually get updated when a new version comes along.

Mind you, there are some Google recommendations that are not so good. I haven't checked if they are still saying that the large css files should be added to the bottom too, even outside the </html>. I had to to that for a site some 3-4 years ago, and of course the code didn't validate, and code validation is also an important criteria.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2765857 Photo


Registered User
614 posts

Thanks again Inger I really appreciate your info after reading what U wrote I will wait and not try and move any JS scripts until I am positive it can be done without causing a major headache. As I said to Eric " If it ain't broke - don't try and fix it"
I have site compressed and passed 9 out 10 sections for Google, so at least I know it isn't that bad.
Thanks hope things are getting better?
Ray
Ray aka Kreations
Since 1994 Chocolate bar wrappers for all occasions.
Since 1972 helping clients help "Discover Their Dream Vacation"

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.