Remove the version number that appears in the HTML source of the form?

06 Nov 2017 12:53 - 06 Nov 2017 14:21 #1 by Demis [Fox-Labs]
Demis [Fox-Labs] created the topic: Remove the version number that appears in the HTML source of the form?
Looking into the HTML source code, you can find something like that
<!-- Fox Contact [scope:component] [id:119] [ver:3.8.0] [time:06.40] -->
These information are meant to help our technical support department while troubleshooting your website in case of a problem.
They include the menu item id or module id, the actual version of Fox Contact, and a time stamp indicating if the page has been generated afresh, or has been taken from the cache.

Believe or not, all these information can be easily retrieved anyway.

Let’s check the versions of Joomla and third party extensions running on the official website:
discloses the Joomla version (3.8.1 at the time of writing this guide).
tells us the presence and the version of Akeeba Backup (5.6.0 at the time of writing this guide).

And so on for any other template or extension, including Fox Contact:

Straight to the point, removing these information from the HTML doesn’t make your site really safer. However, if you still want to remove them, you have basically two options:
  1. The easiest way is to install an extension designed for optimize and minimize your HTML, such as JCH. It will remove all the commented code found into your HTML, giving you a side effect of (a small) additional boost in terms of performance and SEO.
  2. Alternatively you can remove that statement from the Fox Contact source code. In this case, edit the file components/com_foxcontact/layouts/foxcontact/form.php

There, search and remove the following code:
append("<!-- Fox Contact [scope:{$form->getScope()}] [id:{$form->getId()}] [ver:{$form->getVersion()}] [time:" . date('i.s') . '] -->')

Please Log in or Create an account to join the conversation.