Legacy Knowledge Base
Published Jun. 30, 2025

How to hide version of JS libraries

Written By

Jamilly Macedo

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Sometimes when using a tool that identifies a site's web technologies, versions of Javascript libraries (jQuery and YUI, for example) are displayed.

Environment

  • Liferay DXP.

Resolution

  • It is not possible to hide the version of Javascript libraries in the Liferay portal. Here are some reasons why:
    • Liferay does not consider exposing third-party libraries version a vulnerability security. However, we'll update any library containing reported security vulnerabilities.
    • If we hide this information, other libraries and plug-ins that depend on these libraries may experience errors.
    • In the case of jQuery, for example, even if we remove the headers it would be easy to get the version. It could be done by comparing the code with minimal processing. But in addition to this, the library itself offers several ways to obtain the version, such as executing one of these commands in the browser console: jQuery().jquery or $.fn.jquery or jQuery.fn.jquery.

Did this article resolve your issue ?

Legacy Knowledge Base