ConflictGames Posted November 13, 2021 Share Posted November 13, 2021 Site URL: https://www.conflictgames.com/products I want to redirect the product detail page for each of our products. We have created nice hero pages to replace the defaults generated by Squarespace. For example: Go to conflictgames.com/products and click on any of the first products to show. You will be sent to the default, not very attractive Squarespace page. Now, if you go back to the products page, and refresh the page so the code injection footer loads. You will find the link has changed to a better page with more of a hero page feel. The problem is the footer injection code does not load until after the refresh. Therefore, most customers won't see the hero pages. How can we fix this? For example, can we force a direct on the default page? Or, move the injection code to a place that loads earlier? My dev can't figure it out. thanks in advance for the replies. Link to comment
creedon Posted November 13, 2021 Share Posted November 13, 2021 I'm thinking the curse of Ajax Loading strikes again! Try turning off Ajax Loading to see if the problem goes away. Let us know how it goes. Wolfsilon 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
ConflictGames Posted November 14, 2021 Author Share Posted November 14, 2021 OMG. Turning off the ajax loading fixed the issue. The code is loading without a refresh! thank you Creedon. Is there any downside to turing off ajax? creedon 1 Link to comment
creedon Posted November 14, 2021 Share Posted November 14, 2021 paul2009 has a nice article on Ajax and some of the ins and outs. Why does Squarespace code only work on refresh? In the article he describes some ways to make code Ajax compatible. Assuming you decide you want to keep Ajax on. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Beyondspace Posted November 14, 2021 Share Posted November 14, 2021 8 hours ago, ConflictGames said: OMG. Turning off the ajax loading fixed the issue. The code is loading without a refresh! thank you Creedon. Is there any downside to turing off ajax? You can place your code inside squarespace ajax load event Quote <script> document.addEventListener('DOMContentLoaded', init); window.addEventListener('mercury:load', init); function init(){ // javscript goes here } </script> BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment