Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Js files under clientlibs are not getting loaded

The js files under clientlibs are not getting loaded , when I try to access those clientlibs.js using the url //localhost:5555/etc/designs/MyProject/clientlibs.js (I removed http here in this url because then it would be treated as link),
I'm getting a 404 error.

However, if I disable the minify option which is present in the HTML configuration in the felix console, then those js files are getting loaded. Actually the minify option is for compressing the CSS and JS files and also for removing white space characters. I'm not sure why my JS files are not getting loaded when that option is enabled. But in production we are supposed to enable that option.

May I know how we can load those JS files.

Thanks.

like image 621
balaji Avatar asked Jan 16 '23 15:01

balaji


1 Answers

Here, enabling minify option is nothing but compressing the js files.When this option is enabled,and if your js files are not found suddently(getting 404 error while trying to access these js files), then for sure these js files are throwing some error after compression. To confirm that, copy and paste each of your js file content in the YUI compressor which is available online, and try to compress it using that compressor, if it throws error, it is a proof there is some error in the js file and you need to fix it.Hope it helps.

like image 99
balaji Avatar answered Jan 23 '23 13:01

balaji