Legacy Knowledge Base
Published Jun. 30, 2025

Avoiding 'q param' and caching of Favicon in the browser

Written By

Rishabh Agrawal

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • Whenever users navigate to different pages, a new Favicon gets requested each time by generating the new values of the q param which can ultimately consume more data bandwidth.
  • To overcome this, cache the Favicon in the browser since this is consuming more data bandwidth, and better optimization is needed.

  • Steps to check the behavior:
    1. Open the browser's dev tool (F12) with the network tab (disable cache), clear browser cache if not empty.
    2. Access Liferay (for example via localhost:8080)
    3. Filter the list of monitored browser requests by 'fav' for easier observation.
    4. 'Reload' the page by clicking on the page name in the navigation bar (do not refresh the browser tab).

Environment

  • Liferay DXP 7.4
  • Liferay PaaS

Resolution

  • This observed behavior has been addressed via LPD-20691
  • Below are the following observations when users visit different pages:
    1. On every page navigation non cachable favicon is requested.
    2. A new favicon request is caused on each page navigation by the '?q=0.1234567890'.
    3. Such navigation should not cause a new favicon request on each page navigation by the '?q=0.1234567890' style query terms.
    4. So to avoid this, favicon.ico is cached after the first time is rendered hence by avoiding the new favicon requests on each page navigation.
  • Please submit a support ticket for getting a hotfix for the same by attaching patch details. 

Additional Information

  • Please refer to the attached article for more information on how to install hotfix on LXC-SM environment: Installing a Hotfix
Did this article resolve your issue ?

Legacy Knowledge Base