Site logo

Archived topic

Infinite Scroll Not Working Under CDN

9 replies · Started by Fahmi on August 8, 2020

Viewing posts 1–10 of 10

Hi!

I am seeing error in my blog after CDN is activate.

Below is the error:

Uncaught ReferenceError: blog is not defined
at HTMLDocument.<anonymous> (scripts.min.js?ver=1.11.1&iv=30:1)
at i (jquery.js?ver=1.12.4-wp&iv=30:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp&iv=30:2)
at Function.ready (jquery.js?ver=1.12.4-wp&iv=30:2)
at HTMLDocument.J (jquery.js?ver=1.12.4-wp&iv=30:2)

My blog use Comet Cache plugin.

Infinite scroll work normally in http://www.blog.com. All javascript and css work perfectly.

But when CDN is enable, cdn.blog.com. This will produce error above and infinite scroll does not working.

Hi there,

hmmm... not sure how the script will function when content is served from a 3rd party.

Can we see the site with the CDN in place ?

Hi!

I have edit and add the link to my website.

Would you please take a look. Maybe I do something wrong.

The error only occur when cdn is activated.

I have activated the cdn for you to see and the infinite scroll button is not loading when click.

Thank you.

I am not sure its possible to change the Infinite Scroll behaviour - i will check with Tom.

Alright.

But I have deactivate the cdn function. Hope it can be solve.

I believe that error is happening because the file is cached. blog is no longer a variable in the javascript file.

What happens if you clear/purge all caches?

I have tried cleared cache. Trying open website using incognito mode. Open with different browser. It not working and still got error.

It will work when using cache plugin without cdn. And only not work when cdn is enabled.

As a guess, the CDN is loading the old version of the javascript file. Is there any way to force the CDN to grab the updated files?

I got it working now.

It look like cdn is loading the old version of the javascript.

Thanks for your help. :-)

No problem :)

This archived topic is closed to new replies.