huntersgaragellc Posted February 1, 2022 Posted February 1, 2022 (edited) Site URL: https://huntersgaragepa.com/ Hello! My homepage loads slower than I would like, and I think that might have to do with my javascript files. I read somewhere that having the js files in the header area slows page load time because of the retrieval of js files before the content on the page. I have some javascript in Settings > Advanced > Code Injection > "header" and "footer". I would be very appreciative if you could help me or give me some advice. Thank you. edit: It seems the javascript files that are affecting the load time of my website are from squarespace itself... I still would like to know if there is a better practice when adding little bits of javascript, like I have in "header" and "footer". Edited February 1, 2022 by huntersgaragellc
Caroline_Smith Posted February 25, 2022 Posted February 25, 2022 On 2/1/2022 at 9:32 AM, huntersgaragellc said: Site URL: https://huntersgaragepa.com/ Hello! My homepage loads slower than I would like, and I think that might have to do with my javascript files. I read somewhere that having the js files in the header area slows page load time because of the retrieval of js files before the content on the page. I have some javascript in Settings > Advanced > Code Injection > "header" and "footer". I would be very appreciative if you could help me or give me some advice. Thank you. edit: It seems the javascript files that are affecting the load time of my website are from squarespace itself... I still would like to know if there is a better practice when adding little bits of javascript, like I have in "header" and "footer". You might consider minifying your larger JS files so that the load time is decreased. There are plenty of free tools online that can do this for you. Here is one of my favorites: https://www.toptal.com/developers/javascript-minifier/ Feel free to email me with any customization inquiries or questions you may have! Free Squarespace Resources: DevTools Minicourse, 11-Step Guide to Improve Custom CSS, Free Product/Pricing Comparison Table Generator
paul2009 Posted February 25, 2022 Posted February 25, 2022 You are currently loading two different versions of jQuery which will slow down your site. Ideally you shouldn't need jQuery at all because most code can be written more efficiently in pure JavaScript, but you definitely shouldn't have more than one version on your site. For good security, ensure it is the latest version. Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment