• 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

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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.

    Thread Starter ajay423

    (@ajay423)

    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!!

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

    Why?

    Thread Starter ajay423

    (@ajay423)

    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.

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

    Thread Starter ajay423

    (@ajay423)

    Thanks so much for the quick response.

    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 https://wpoffice.net/wp-secure-pro-plugin-wordpress/

    ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘minify wordpress core js files’ is closed to new replies.