Wordpress LScache Plugin: Malformed nonce in JS
Last Updated on: Wed, 15 Apr 2026 00:00:02 With the LiteSpeed Cache running (I did verify this), there appears to be an issue that causes the nonce assignment in the JS to become malformed. The nonce is still there but gets a bunch of new lines prepended, causing the assignment to break, like this: [...] WP_Statistics_http.open(GET, https://www.wbsitehere.com/wp-json/wp-statistics/v2/hit?_=123456789&_wpnonce= 0123456789&wp_statistics_hit_rest [...] This issue appeared overnight. Purging does nothing, neither does deactivating other plugins. Only turning off the cache works. Report Number: WISDWTBN Edit 1: Downgrading to the previous version did not help. Edit 2: Upgrading to the latest dev version did not help. This topic was modified 8 months, 1 week ago by tetrakern. This topic was modified 8 months, 1 week ago by tetrakern. Still no solution, but /?LSCWP_CTRL=before_optm showed that this is probably a page optimization issue. Funny though, I havent even turned them on. Oh, well, dont think this will hurt since the nonce expired. Here is a diff of the site without cache (left) and with (right). For some reason, any inline JS get multiple new lines injected somewhere. I would very much like this not to happen. The problem has vanished! It may or may not have been caused by some overzealous if ( ! defined( ABSPATH ) ) exit that have been removed or another inline JS part I pre-minified. No clue whatsoever. Anyway, Im marking this as resolved. Wish I had more to offer in terms of a solution if anyone encounters this too aside from ehh .
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference