WordPress.org

Ready to get started?Download WordPress

Forums

minify wordpress core js files (8 posts)

  1. ajay423
    Member
    Posted 9 months ago #

    Hi

    I need to remove comments from js files in my website.

    - Is its a best practice to remove JS Comments.
    - does a JS minify removes the comments.
    - is its best practice to minify wordpress core js files.
    - what happens when we update wordpress version.

    Please suggest!!
    Thanks in advance

  2. esmi
    Forum Moderator
    Posted 9 months ago #

    I need to remove comments from js files in my website.

    Why?

    what happens when we update wordpress version

    You should never, EVER, edit core WordPress files.

  3. ajay423
    Member
    Posted 9 months ago #

    Thanks for the reply

    I have a requirement to remove HTML and Javascript comments from my website. Few comments i have found in the below core file.
    "wp-includes/js/thickbox/thickbox.js"
    example : //pass where to apply thickbox
    // preload image

    Please suggest!!

  4. esmi
    Forum Moderator
    Posted 9 months ago #

    I have a requirement to remove HTML and Javascript comments from my website.

    Why?

  5. ajay423
    Member
    Posted 9 months ago #

    HTML and JavaScript comments are listed in vulnerability list

    - HTML & JavaScript Comments vulnerabilities are disclosures of internal information caused by any comments in HTML or
    JavaScript present in pages. The SmartAttack examines responses containing HTML or JavaScript, and reports any
    comments observed therein. The significance of such vulnerabilities depends on the specific disclosures involved and the
    policies of the organization.

  6. esmi
    Forum Moderator
    Posted 9 months ago #

    There is no security issues associated with these comments. Do not edit WordPress core files.

  7. ajay423
    Member
    Posted 9 months ago #

    Thanks so much for the quick response.

  8. Toan Nguyen
    Member
    Posted 9 months ago #

    Removing and minify the JS, HTML, CSS is the best solution to speed up you site.

    I don't recommend you do it in WP core, only for the plugins or the theme is installed.

    There are have many plugins like that, this is my plugin, I think it can help you make the change http://wpoffice.net/wp-secure-pro-plugin-wordpress/

    :)

Reply

You must log in to post.

About this Topic