Page 1 of 1
Page_Head writing full script names out
Posted: Fri Jun 09, 2023 3:59 am
by sticcino
have the following in Page_Head
AddClientScript("js/diff_match_patch.js");
AddStylesheet("css/jquery-confirm.min.css");
AddClientScript("js/jquery-confirm.min.js");
when it writes out....
<?php
AddClientScript("js/diff_match_patch.js");
AddStylesheet("css/jquery-confirm.min.css");
AddClientScript("js/jquery-confirm.js");
?>
notice the 3rd item jquery-confirm.js --> should be jquery-confirm-min.js
not sure why its not writing out the full name on that particular item
Re: page_head now writing full script names out
Posted: Fri Jun 09, 2023 10:59 am
by arbei
You better always provide both normal and minimized versions. When Debug is enabled, it will use the normal version. When development is completed, you may turn off Debug and the minimized version will be generated.
If you want to use minimized version (when Debug is disabled) anyway, you may enable the advanced setting Compress project .js.
Re: page_head now writing full script names out
Posted: Fri Jun 09, 2023 7:59 pm
by sticcino
Hi
no sorry, what i mean is PHPM is writing out the "filename" incorrectly into the layout.php file
the filename is: jquery-confirm.min.js
PHPM is writing "jquery-confirm.js" (the .min is missing)
but on the corresponding .css file it writes it out correctly (with the .min)
i'm not using compression for the files
Re: page_head now writing full script names out
Posted: Fri Jun 09, 2023 9:47 pm
by arbei
arbei wrote:
When development is completed, you may turn off Debug and the minimized version will be generated.
Meaning "xxx.min.js" will be replaced by "xxx.js" if the advanced setting "Debug" is enabled.
If you want to use minimized version (when Debug is disabled) anyway, you may enable the advanced setting Compress project .js
Meaning "xxx.min.js" will not be replaced by "xxx.js" if "Debug" is disabled and the advanced setting "Compress project .js" is enabled (usually in "production" environment).
During development, usually you enable "Debug", so you should always provide both normal and minimized versions for both development and production environment.