Page_Head writing full script names out

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sticcino
User
Posts: 1043

Page_Head writing full script names out

Post 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


arbei
User
Posts: 9286

Post 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.


sticcino
User
Posts: 1043

Post 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


arbei
User
Posts: 9286

Post 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.


Post Reply