Wordpress LScache Plugin: JS Minify/Combine Truncating Long Files
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello, Ive been using LSCache for many years and now on two occasions have had an issue with very long javascript files being truncated when using the JS Combine function. When minify is used, the whole file content ends up on one line. This specific file ends up being 160,148 characters long on one line. It works fine without JS Combine. When JS Combine is turned on, the file/line is truncated after 149,861 characters which obviously then causes javascript errors and prevents the page loading correctly. The exact error message is Unexpected EOF? Screen shot below of where it gets truncated. Screen Shot What causes this issue and how can I fix it without having to switch off combine, or remove this file from being combined? Hi, If you know which file was cut off incomplete , you can use JS exclude Best regards, @CacheCrawler That is not a helpful response. Clearly, I am aware that the file can be excluded as my question quite clearly states how can I fix it without having to switch off combine, or remove this file from being combined? The question is: Why is a file being truncated, and how can this be fixed without having to exclude the file, or turn off combine? The file should be getting truncated! Hi, how can I fix it without having to switch off combine, or remove this file from being combined yeah well, I guess this can be interpreted as how to fix it , or how to remove file from combien so actually you mean how to fix or without remove it from combine Please try enable debug log , it could give some hint Toolbox -> debug , set IP to your IP , log level to advance, purge all , access the page , see what it show up in log viewer tab you can copy all the text , paste it into https://paste.ubuntu.com/ then post the link it generated for you. You may see many unrelated information , in such case, it is better to export your current setting , reset to default , and only enable JS minify/combine , this way , it wont invoke other functions into debug log. Best regards, I dont see any error in the log file. log the combined js file is 2c272.js Hi, Do you happen to know , the cut-off, incomplete code was come from which JS file ? Best regards, mediaelement-and-player.min.js Hi, Could you please try the latest commit ? You can get it in toolbox -> beta test -> click github , then upgrade Weve made some improvement to JS opitmizations Best regards, @CacheCrawler I will need to spend some time updating my dev environment in order to test that. The issue I am experiencing is in production. Is this test just a shot in the dark, or have you identified the cause of the issue? Hi, Yeah well , this is a dark shot , but switch between stable release and github version should be simple as few clicks. we are re-working and improve some JS features on this regard. Best regards, Its not just a few clicks if you need to refresh your whole dev environment first? Im certainly not going to test a beta release on a live website. Hi, Im going to mark this topic Resolved , due to lack of activity. If you still need help, please feel free to re-open it. Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference