• Resolved alikit

    (@alikit)


    Hello,
    First of all, thanks for your good and useful plugin.
    Please minify JavaScript and CSS codes of your plugin in the next update. It makes an issue for the website SEO, as it appears always in our SEO tools.
    Thanks in advance and regards.

    • This topic was modified 2 years, 10 months ago by alikit.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @alikit

    Thank you very much for the suggestion. I’ll update these fields in the next plugin update.

    Best regards.

    Plugin Author codepeople

    (@codepeople)

    Hello @alikit

    Thank you so much for using our plugin. I’ve released an update that minifies the public CSS and JS files.

    Best regards.

    Thread Starter alikit

    (@alikit)

    Hello,

    Thanks but still seems to be a JS file without minifying, please check it again.
    Root: loading-page/loading-screens/logo/loading-logo.js?ver=free-1.0.81

    Thanks and regards.

    Plugin Author codepeople

    (@codepeople)

    Hello @alikit

    I guess you are loading a file copy from the cache. Please, send me your website’s link to check it in detail.

    Best regards.

    Thread Starter alikit

    (@alikit)

    I just clear all cache data from my browser and test it again, it still appear following error in Rank Math SEO analyze tool:

    Some CSS files don’t seem to be minified.
    …/plugins/loading-page/loading-screens/logo/loading-logo.js?ver=free-1.0.81

    Current JS file code:

    var cp_loadingpage=cp_loadingpage||{};cp_loadingpage.graphics=cp_loadingpage.graphics||{};
    cp_loadingpage.graphics.logo={created:!1,attr:{percentage:0},create:function(a){a.backgroundColor=a.backgroundColor||"#000000";a.foregroundColor=a.foregroundColor||"#FFFFFF";this.blink=this.grayscale=0;this.attr.foreground=a.foregroundColor;var b={width:"100%",height:"100%",backgroundColor:a.backgroundColor,position:"fixed",zIndex:666999,top:0,left:0};a.backgroundImage&&(b.backgroundImage="url("+a.backgroundImage+")",b["background-repeat"]=a.backgroundRepeat,b["background-position"]="center center",
    "no-repeat"==b["background-repeat"].toLowerCase()&&"undefined"!==typeof a.fullscreen&&1==1*a.fullscreen&&(b["background-attachment"]="fixed",b["-webkit-background-size"]="contain",b["-moz-background-size"]="contain",b["-o-background-size"]="contain",b["background-size"]="contain"));this.attr.overlay=jQuery("<div class='lp-screen'></div>").css(b).appendTo("html");a.text&&(this.attr.text=jQuery("<div class='lp-screen-text'></div>").text("0%").css({lineHeight:"40px",height:"40px",width:"100px",position:"absolute",
    fontSize:"30px",top:this.attr.overlay.height()/2,left:this.attr.overlay.width()/2-50,textAlign:"center",color:a.foregroundColor}).appendTo(this.attr.overlay));"undefined"==typeof a.lp_ls||"undefined"==typeof a.lp_ls.logo||"undefined"==typeof a.lp_ls.logo.image||/^\s*$/.test(a.lp_ls.logo.image)||(this.grayscale="undefined"==typeof a.lp_ls.logo.grayscale||1*a.lp_ls.logo.grayscale,this.blink="undefined"==typeof a.lp_ls.logo.blink||1*a.lp_ls.logo.blink,b=jQuery('<span style="width:120px;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);display: inline-block;"></span>'),
    a=jQuery.trim(a.lp_ls.logo.image),a=jQuery('<img id="lp_ls_img" src="'+a+'"  style="cursor:pointer;width:120px;'+(this.grayscale?"-webkit-filter:grayscale(100%);filter:grayscale(100%);":"")+'" class="'+(this.blink?"lp_blink":"")+'" />'),a.on("click",cp_loadingpage.destroyLoader),b.append(a).appendTo(this.attr.overlay),this.attr.text&&b.append(this.attr.text.css({position:"relative",top:"auto",left:"auto",width:"100%","margin-top":"20px"})));this.set(0);this.created=!0},set:function(a){this.attr.percentage=
    a;this.attr.text&&this.attr.text.text(Math.ceil(a)+"%");this.grayscale&&jQuery("#lp_ls_img").css({"-webkit-filter":"grayscale("+(100-a)+"%)",filter:"grayscale("+(100-a)+"%)"})},complete:function(a){a();var b=this;this.attr.overlay.fadeOut(1500,function(){b.attr.overlay.remove()})}};

    I think it should be change to:

    var cp_loadingpage=cp_loadingpage||{};cp_loadingpage.graphics=cp_loadingpage.graphics||{};cp_loadingpage.graphics.logo={created:!1,attr:{percentage:0},create:function(a){a.backgroundColor=a.backgroundColor||"#000000";a.foregroundColor=a.foregroundColor||"#FFFFFF";this.blink=this.grayscale=0;this.attr.foreground=a.foregroundColor;var b={width:"100%",height:"100%",backgroundColor:a.backgroundColor,position:"fixed",zIndex:666999,top:0,left:0};a.backgroundImage&&(b.backgroundImage="url("+a.backgroundImage+")",b["background-repeat"]=a.backgroundRepeat,b["background-position"]="center center","no-repeat"==b["background-repeat"].toLowerCase()&&"undefined"!==typeof a.fullscreen&&1==1*a.fullscreen&&(b["background-attachment"]="fixed",b["-webkit-background-size"]="contain",b["-moz-background-size"]="contain",b["-o-background-size"]="contain",b["background-size"]="contain"));this.attr.overlay=jQuery("<div class='lp-screen'></div>").css(b).appendTo("html");a.text&&(this.attr.text=jQuery("<div class='lp-screen-text'></div>").text("0%").css({lineHeight:"40px",height:"40px",width:"100px",position:"absolute",fontSize:"30px",top:this.attr.overlay.height()/2,left:this.attr.overlay.width()/2-50,textAlign:"center",color:a.foregroundColor}).appendTo(this.attr.overlay));"undefined"==typeof a.lp_ls||"undefined"==typeof a.lp_ls.logo||"undefined"==typeof a.lp_ls.logo.image||/^\s*$/.test(a.lp_ls.logo.image)||(this.grayscale="undefined"==typeof a.lp_ls.logo.grayscale||1*a.lp_ls.logo.grayscale,this.blink="undefined"==typeof a.lp_ls.logo.blink||1*a.lp_ls.logo.blink,b=jQuery('<span style="width:120px;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);display: inline-block;"></span>'),a=jQuery.trim(a.lp_ls.logo.image),a=jQuery('<img id="lp_ls_img" src="'+a+'" style="cursor:pointer;width:120px;'+(this.grayscale?"-webkit-filter:grayscale(100%);filter:grayscale(100%);":"")+'" class="'+(this.blink?"lp_blink":"")+'" />'),a.on("click",cp_loadingpage.destroyLoader),b.append(a).appendTo(this.attr.overlay),this.attr.text&&b.append(this.attr.text.css({position:"relative",top:"auto",left:"auto",width:"100%","margin-top":"20px"})));this.set(0);this.created=!0},set:function(a){this.attr.percentage=a;this.attr.text&&this.attr.text.text(Math.ceil(a)+"%");this.grayscale&&jQuery("#lp_ls_img").css({"-webkit-filter":"grayscale("+(100-a)+"%)",filter:"grayscale("+(100-a)+"%)"})},complete:function(a){a();var b=this;this.attr.overlay.fadeOut(1500,function(){b.attr.overlay.remove()})}}

    Please verify it again, thanks and regards.

    Plugin Author codepeople

    (@codepeople)

    Hello @alikit

    The file was minified using the Google Tools, specifically the “Google Closure Compiler”: https://developers.google.com/closure/compiler

    Best regards.

    Thread Starter alikit

    (@alikit)

    Ok, probably Rank Math can’t verify it correctly.

    If think all is correct it should be Ok, but as I confirmed in another compilers also there is a bit difference after compiling, like I sent.

    Thanks for your efforts and regards.

    Thread Starter alikit

    (@alikit)

    Hello again,

    Thanks for your recent update, but seems that you added a new JS file which is not minified again!
    Please minify it and also all new files in the future updates to be more SEO friendly.

    Root: …/loading-page/loading-screens/logo/loading-logo.js

    Thank you and regards.

    Plugin Author codepeople

    (@codepeople)

    Hello @alikit

    The file you are referring to was minified with “Google Closure Compiler”: https://developers.google.com/closure/compiler

    Please, look at the comparison of the minified file and the regular one:

    Minified version:

    https://demos.dwbooster.com/loading-page/wp-content/plugins/loading-page/loading-screens/logo/loading-logo.js

    Regular version:

    https://demos.dwbooster.com/loading-page/wp-content/plugins/loading-page/loading-screens/logo/loading-logo.src.js

    Best regards.

    Thread Starter alikit

    (@alikit)

    Yes but there’s a little difference in the details and only in spaces. Again RankMath show it as a issue: is not minified!

    This is result showing in minifier.org , please check it:

    var cp_loadingpage=cp_loadingpage||{};cp_loadingpage.graphics=cp_loadingpage.graphics||{};cp_loadingpage.graphics.logo={created:!1,attr:{percentage:0},create:function(a){a.backgroundColor=a.backgroundColor||"#000000";a.foregroundColor=a.foregroundColor||"#FFFFFF";this.blink=this.grayscale=0;this.attr.foreground=a.foregroundColor;var b={width:"100%",height:"100%",backgroundColor:a.backgroundColor,position:"fixed",zIndex:666999,top:0,left:0};a.backgroundImage&&(b.backgroundImage="url("+a.backgroundImage+")",b["background-repeat"]=a.backgroundRepeat,b["background-position"]="center center","no-repeat"==b["background-repeat"].toLowerCase()&&"undefined"!==typeof a.fullscreen&&1==1*a.fullscreen&&(b["background-attachment"]="fixed",b["-webkit-background-size"]="contain",b["-moz-background-size"]="contain",b["-o-background-size"]="contain",b["background-size"]="contain"));this.attr.overlay=jQuery("<div class='lp-screen'></div>").css(b).appendTo("html");a.text&&(this.attr.text=jQuery("<div class='lp-screen-text'></div>").text("0%").css({lineHeight:"40px",height:"40px",width:"100px",position:"absolute",fontSize:"30px",top:this.attr.overlay.height()/2,left:this.attr.overlay.width()/2-50,textAlign:"center",color:a.foregroundColor}).appendTo(this.attr.overlay));"undefined"==typeof a.lp_ls||"undefined"==typeof a.lp_ls.logo||"undefined"==typeof a.lp_ls.logo.image||/^\s*$/.test(a.lp_ls.logo.image)||(this.grayscale="undefined"==typeof a.lp_ls.logo.grayscale||1*a.lp_ls.logo.grayscale,this.blink="undefined"==typeof a.lp_ls.logo.blink||1*a.lp_ls.logo.blink,b=jQuery('<span style="width:120px;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);display: inline-block;"></span>'),a=jQuery.trim(a.lp_ls.logo.image),a=jQuery('<img id="lp_ls_img" src="'+a+'" style="cursor:pointer;width:120px;'+(this.grayscale?"-webkit-filter:grayscale(100%);filter:grayscale(100%);":"")+'" class="'+(this.blink?"lp_blink":"")+'" />'),a.on("click",cp_loadingpage.destroyLoader),b.append(a).appendTo(this.attr.overlay),this.attr.text&&b.append(this.attr.text.css({position:"relative",top:"auto",left:"auto",width:"100%","margin-top":"20px"})));this.set(0);this.created=!0},set:function(a){this.attr.percentage=a;this.attr.text&&this.attr.text.text(Math.ceil(a)+"%");this.grayscale&&jQuery("#lp_ls_img").css({"-webkit-filter":"grayscale("+(100-a)+"%)",filter:"grayscale("+(100-a)+"%)"})},complete:function(a){a();var b=this;this.attr.overlay.fadeOut(1500,function(){b.attr.overlay.remove()})}}

    Thanks and regards.

    Plugin Author codepeople

    (@codepeople)

    Hello @alikit

    There are multiple algorithms and metrics for minifying or considering a .js or .css file minified. We use the metrics used by Google and its browser. Please, look at the audit summary below:

    This audit uses the same metrics as the Google search engine to measure the websites’ performance.

    Best regards.

    Thread Starter alikit

    (@alikit)

    Hello and sorry for the late reply.

    Yes, that’s right. Thank you although it still gives a notice to minify following JS file which probably is their plugin difference, if all is right from your side.
    …/loading-page/loading-screens/logo/loading-logo.js

    Thanks for your support and regards.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Edit codes (minify)’ is closed to new replies.