Jump to content

Can't load a google sheet unless I REFRESH the page...help!

Recommended Posts

Hey Gang,

I'm a newbie at anything script related, however, I figured out how to display the contents of a google sheet on a Squarespace page using the CODE block.

In a code block, on a blank page, I entered:

<div data-first-sheet="true" data-sheet2site="1LFO7CgWX2isRSd7J9Zwuxxp-vM_UADO4iEQPKsTC-Hs&g=1&e=1"></div><script src="https://sheet2site.com/js/embedded.js"></script>

So here's the problem.  When I load then page, nothing happens, but when I refresh the page, all of the data appears.

How can I get the data to load on the first page view?

To see the page, go to https://www.robspictures.com/did-i-order

Thanks you so much!

 

Rob

Link to comment
  • Replies 1
  • Views 251
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I'm thinking the curse of Ajax Loading strikes again! Try, temporarily, turning off Ajax Loading to see if the problem goes away.

 

Please note that turning off Ajax Loading will effect the performance of your site. Ajax Loading is designed to increase the loading speed of your site after it first loads.

If the problem goes away then it is likely the code has not been written to be Ajax compatible. It would need to be rewritten to be Ajax compatible, assuming it it even possible.

You have to decide whether the custom code you are trying to use is worth turning off Ajax Loading. Or, it is worth trying to get an Ajax compatible version of the code.

paul2009 has a great article on the ins and outs of Ajax Loading. Please see Why does Squarespace code only work on refresh?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.