Need Guideline how to optimize the Performance of the best way

Shuhib
15 Posts
Shuhib posted this 08 July 2023
Ask a Question

Hi dear NP Team,

your solution to export the codes into static files is awesome for every developer :D

i know this question need a senior support agent or a developer, who can reply it, there is some similar question in the forum, but none of them belongs to with NP 5.12

but there are so many dead codes which decreased the performance... after every export i try to remove all of them by vscode, but it's very laboriously... therefore do you have a guideline to solve these matters or do you know a free tool to remove unused css and js?

thanks for any hints :D

Hi dear NP Team, your solution to export the codes into static files is awesome for every developer :D i know this question need a senior support agent or a developer, who can reply it, there is some similar question in the forum, but none of them belongs to with NP 5.12 but there are so many dead codes which decreased the performance... after every export i try to remove all of them by vscode, but it's very laboriously... therefore do you have a guideline to solve these matters or do you know a free tool to remove unused css and js? thanks for any hints :D
Vote to pay developers attention to this features or issue.
8 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 09 July 2023

Hello Shuhib,

Yes, there are several tools available that can help you remove unused CSS and JS files from your website. Here are a few options:

PurgeCSS: PurgeCSS is a popular tool for removing unused CSS. It analyzes your code and detects the CSS classes and selectors that are not used, allowing you to remove them.
UnusedCSS: UnusedCSS is an online tool that scans your website and identifies unused CSS selectors. You simply provide the URL of your website, and it will generate a report of the unused CSS selectors.

Before using any of these tools, it's important to make sure you have a backup of your code in case any unintended changes occur. Additionally, it's worth noting that automated tools may not always accurately identify all unused CSS or JS files, so manual review may still be necessary.

...................................................
Sincerely,
George.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello Shuhib, Yes, there are several tools available that can help you remove unused CSS and JS files from your website. Here are a few options: PurgeCSS: PurgeCSS is a popular tool for removing unused CSS. It analyzes your code and detects the CSS classes and selectors that are not used, allowing you to remove them. UnusedCSS: UnusedCSS is an online tool that scans your website and identifies unused CSS selectors. You simply provide the URL of your website, and it will generate a report of the unused CSS selectors. Before using any of these tools, it's important to make sure you have a backup of your code in case any unintended changes occur. Additionally, it's worth noting that automated tools may not always accurately identify all unused CSS or JS files, so manual review may still be necessary. ................................................... Sincerely, George. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
Shuhib
15 Posts
Shuhib posted this 10 July 2023

hi dear NP Team,

many many thanks for your help

i've just tested purge css

the installation was easy

pnpm install purgecss -g

-g means globally

and excecute with command
1. create a random folder to output the modified css file
2. execute this command

purgecss --css FILENAME.css --content *.html *.js --output OUTPUTFOLDERNAME

3.replace the origin oversized css with them of the output-folder (it will be have same name)
and my css file is now from 1365 kb into 125 kb, and is from 41k lines into 5.6k. Everything works till now :D

looks great, many many thanks

do you know also a js and min.js code optimizer?

many thanks for your support

hi dear NP Team, many many thanks for your help i've just tested purge css the installation was easy pnpm install purgecss -g -g means globally and excecute with command 1. create a random folder to output the modified css file 2. execute this command purgecss --css FILENAME.css --content *.html *.js --output OUTPUTFOLDERNAME 3.replace the origin oversized css with them of the output-folder (it will be have same name) and my css file is now from 1365 kb into 125 kb, and is from 41k lines into 5.6k. Everything works till now :D looks great, many many thanks do you know also a js and min.js code optimizer? many thanks for your support

Last edited 10 July 2023 by Shuhib

Shuhib
15 Posts
Shuhib posted this 10 July 2023

i'm sorry this is a better command

purgecss --css *.css --content *.html *.js --output OutPutFolderName

with this command you can compress and purifying all Css files at once :D

and like earlier took all modified css files and replace with the old ones ... I ♥ NicePage

i'm sorry this is a better command purgecss --css *.css --content *.html *.js --output OutPutFolderName with this command you can compress and purifying all Css files at once :D and like earlier took all modified css files and replace with the old ones ... I ♥ NicePage
Support Team
Support Team posted this 10 July 2023

Hello Shuhib,

You're welcome!

For JavaScript and min.js code optimization, there are several tools available:
Closure Compiler: this is a popular JavaScript optimizer and minifier developed by Google.
UglifyJS: this is a widely used JavaScript minifier and optimizer
These tools provide options for configuring various optimizations and compression levels to suit your needs.

...................................................
Sincerely,
George.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello Shuhib, You're welcome! For JavaScript and min.js code optimization, there are several tools available: Closure Compiler: this is a popular JavaScript optimizer and minifier developed by Google. UglifyJS: this is a widely used JavaScript minifier and optimizer These tools provide options for configuring various optimizations and compression levels to suit your needs. ................................................... Sincerely, George. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
Shuhib
15 Posts
Shuhib posted this 2 weeks ago

many many thanks for your help George,

closure and uglifyJS sounds great... but unfotunately it does'nt remove the useless JS codes, therefore do you know anything else which could remove the useless JS codes like purgecss? but for js instead for css :)

many many thanks for your help George, closure and uglifyJS sounds great... but unfotunately it does'nt remove the useless JS codes, therefore do you know anything else which could remove the useless JS codes like purgecss? but for js instead for css :)

Last edited 2 weeks ago by Shuhib

Support Team
Support Team posted this 2 weeks ago

Hello Shuhib,

You're welcome!

Unfortunately not, I am sorry. If you have any more questions, feel free to ask.

The best wishes from Nicepage.
...................................................
Sincerely,
George.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello Shuhib, You're welcome! Unfortunately not, I am sorry. If you have any more questions, feel free to ask. The best wishes from Nicepage. ................................................... Sincerely, George. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
Shuhib
15 Posts
Shuhib posted this 2 weeks ago

yet, many many thanks for your help i think the best solution is the manual solution of chrome coverage right now

but it's unfortunately a manual solution lol 😅
https://developer.chrome.com/docs/devtools/coverage

yet, many many thanks for your help i think the best solution is the manual solution of chrome coverage right now but it's unfortunately a manual solution lol 😅 https://developer.chrome.com/docs/devtools/coverage
Support Team
Support Team posted this 2 weeks ago

Hello Shuhib,

You're welcome! Please let us know if you have any further questions. The best wishes from Nicepage.
...................................................
Sincerely,
George.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello Shuhib, You're welcome! Please let us know if you have any further questions. The best wishes from Nicepage. ................................................... Sincerely, George. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp

Last edited 2 weeks ago by Support Team

You must log in or register to leave comments