Forum Moderators: Robert Charlton & goodroi

Unused code

Optimizing unused script

         

georgimakarti

2:39 pm on Jul 1, 2024 (gmt 0)

Top Contributors Of The Month



Can you give me any advice for removing and minifying unused css js html and any code for an website

RedBar

2:50 pm on Jul 1, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



and any code for an website

Such as what?

Here's a good resource:

[w3.org...]

[edited by: not2easy at 7:22 pm (utc) on Jul 1, 2024]
[edit reason] fixed broken link/404 [/edit]

not2easy

4:11 pm on Jul 1, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If you are using WordPress, be careful to use various pages for testing, the w3 link is great for giving a free, in depth report, but if you remove any code not in use on the page you use for testing, it may show up as broken dependent files that were not tested. Submit as many URLs as you need to cover all page types. Whatever you do, don't edit the main file without keeping a copy of the original CSS in case that shows up down the road. All elements defined in your CSS file may not be in use on your site's home page.

georgimakarti

6:44 pm on Jul 1, 2024 (gmt 0)

Top Contributors Of The Month



Thank you for the reply but i dont see what could i use in this w3 link

not2easy

7:21 pm on Jul 1, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I see what you mean, it looks like that is a broken link or it has punctuation added. The link to test HTML and/or CSS is found on their newer Developer's Tools page here: [w3.org...]

You submit the URL where you want to test and they give you test results listing any errors or missing elements for your css/html. That is one reason I mentioned about if you are using Wordpress because if you don't know how to write css/html it will not be as helpful to you, just offering a list of things that need to be looked at or fixed. Cutting back on code bloat only happens if you understand it when you see it.

Featured image: webmasterworld
www.w3.org
Validators and tools
 This page lists the validators and web developer tools.

georgimakarti

7:25 pm on Jul 1, 2024 (gmt 0)

Top Contributors Of The Month



I really appreciate your help i think this is just what i needed, yes i write the code and understand it as much as i need :) . Thank you again!
 


 


 


 

Status: 403 Forbidden