Title: Uncaught SyntaxError: Unexpected token &#8216;&lt;&#039;
Last modified: November 8, 2023

---

# Uncaught SyntaxError: Unexpected token ‘<'

 *  Resolved [hanneslsm](https://wordpress.org/support/users/hanneslsm/)
 * (@hanneslsm)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/)
 * Hello there,
   I’ve created a website with a custom block theme and even got the
   website to get all 100 points on the Lighthouse test, also because of the plugin.
   Thank you very much!However, visitors complain about the website being broken.
   I only can replicate this issue when visiting the site with a VPN (interestingly
   not always, maybe a localisation issue?).The console logs the error`Uncaught 
   SyntaxError: Unexpected token '<'`
 * Here is a screen recording that shows the issue better than I could explain:
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-syntaxerror-unexpected-token-36%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17183279)
 * That is odd. I saw the same thing but when I added a random number to the URL,
   like ?123 it generated a new cache file and that version was ok.
 * I think there’s a bug on your site causing this error, that only shows to some
   users. This plugin caches it as a static html page and then that html is served
   to everyone.
 * I saved the html of your front page twice, once when it was broken, once when
   it was fixed and saw a few odd differences. Even the body tag was different:
 * > <body data-cmplz=”2″ class=”home page-template page-template-PageFullwidthnotitle
   > page page-id-23 wp-custom-logo wp-embed-responsive cmplz-preferences cmplz-
   > functional cmplz-eu cmplz-optin” data-aos-easing=”ease” data-aos-duration=”
   > 400″ data-aos-delay=”0″>
   >  Body tag on fixed homepage
 * > <body data-cmplz=”2″ class=”home page-template page-template-PageFullwidthnotitle
   > page page-id-23 wp-custom-logo wp-embed-responsive”>
   >  Body tag on broken homepage
 * The later `<a href="https://linktec.com/"` chunk of code links to an actual image
   on the fixed site, but on the broken one, it uses an uuencoded image.
 * Maybe disable some of the optimization plugins you have installed and see if 
   that makes a difference? I’m confident it’s not a problem in this plugin. It’s
   only highlighting the problem because the broken pages are cached.
 *  Thread Starter [hanneslsm](https://wordpress.org/support/users/hanneslsm/)
 * (@hanneslsm)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17183368)
 * Thanks for the quick response and testing!
   I now have all plugins deactivated
   and only WP Super cache activated.This issue still exists having WP super cache
   activated without any other plugins. It must at least somehow related to this
   plugin.Can you try again on your end?
 * Could it be something coming from the theme? I have build it from scratch using
   the create block theme plugin [https://github.com/hanneslsm/prolooks-3](https://github.com/hanneslsm/prolooks-3)
 *  Thread Starter [hanneslsm](https://wordpress.org/support/users/hanneslsm/)
 * (@hanneslsm)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17183481)
 * I was able to reproduce the issue. It’s definitely coming from the WP Super Cache
   Plugin. The issue occurs after the cache is generated.
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17183782)
 * Thanks for the video. That is enlightening. Can you send me a copy of your theme
   so I can try it on a test site? There’s a form on [https://odd.blog/the-development-version-of-wp-super-cache/](https://odd.blog/the-development-version-of-wp-super-cache/)
   you can use, if you can zip it up for me, put it on Dropbox, or your site and
   send me a link to it, I will test it.
 * Does the theme have any user agent sniffing so it displays things differently
   to some browsers? I noticed the page was corrupted when you ran the tester, so
   I tried to grab it (using GET parameters for fresh caches) with wget and curl
   but the cached versions were ok.
 * The plugin uses an output buffer to grab the contents of the page to store it.
   It doesn’t do any minification of the JavaScript or modify CSS or images at all,
   unless you have the CDN feature enabled. That CDN feature just rewrites hostnames.
   It doesn’t convert them to uuencoded data for example.
 *  Thread Starter [hanneslsm](https://wordpress.org/support/users/hanneslsm/)
 * (@hanneslsm)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17183791)
 * Thank you for looking into it!
   The theme is on Github: [https://github.com/hanneslsm/prolooks-3](https://github.com/hanneslsm/prolooks-3)
 *  Thread Starter [hanneslsm](https://wordpress.org/support/users/hanneslsm/)
 * (@hanneslsm)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17183813)
 * > Does the theme have any user agent sniffing so it displays things differently
   > to some browsers? 
 * No, I’m not aware of any. If so, then only because the Create Block theme plugin
   or Gutenberg has added any.
   The issue occurs also in iOS Safari and Firefox.
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17184041)
 * I managed to download a copy of your front page when it was broken. There’s something
   weird going on there. The broken page has translated elements like “Comments 
   Feed” and is using style.min.css where the fixed page uses the German “Kommentar-
   Feed” and uses style.css
 * I noticed something that might be the reason for this. I loaded your page but
   some of the images were blank. I opened the image in a new browser tab and instead
   of the image I saw your homepage again. When I refreshed, the image appeared.
 * I did the same with viewing the source of style.min.css when the page looked 
   broken and your front page source showed. When I refreshed, the minified css 
   file showed.
 * Do you have a reverse proxy in front of your site? Or some sort of local proxy
   or mod_rewrite rules or something that’s supposed to cache static content?
 *  Thread Starter [hanneslsm](https://wordpress.org/support/users/hanneslsm/)
 * (@hanneslsm)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17184350)
 * > Do you have a reverse proxy in front of your site? Or some sort of local proxy
   > or mod_rewrite rules or something that’s supposed to cache static content?
 * I am not aware of this, but I’ll check in with my hoster.
 *  Thread Starter [hanneslsm](https://wordpress.org/support/users/hanneslsm/)
 * (@hanneslsm)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17184638)
 * I don’t know much about server configuration and caching, but I found that nginx
   cache was activated. Deactivating it did in fact resolve the issue, however I
   do not see any difference in loading times between nginx caching or using the
   plugin. 
   The server configuration settings: [https://docs.plesk.com/en-US/obsidian/customer-guide/websites-and-domains/hosting-settings/web-server-settings/apache-and-nginx-settings.72320/#enabling-nginx-caching](https://docs.plesk.com/en-US/obsidian/customer-guide/websites-and-domains/hosting-settings/web-server-settings/apache-and-nginx-settings.72320/#enabling-nginx-caching)
 * What would be the advantage of using the WP Super cache plugin over the nginx
   cache? Is there any difference? Using both simultaneously doesn’t seem to work.
 *  Thread Starter [hanneslsm](https://wordpress.org/support/users/hanneslsm/)
 * (@hanneslsm)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17184704)
 * I guess the nginx caching was the issue. I now deactivated it and keep the Plugin.
   Thanks for pointing me to the solution!
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17185043)
 * Glad to hear it’s fixed!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Uncaught SyntaxError: Unexpected token ‘<'’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-unexpected-token-36/#post-17185043)
 * Status: resolved