Page 1 of 1

How to remove meta generator in Joomla 1.7 and 2.5?

Posted: Wed Apr 04, 2012 3:52 am
by Saman
If you view your page source in a Joomla powered site, you will notice that there is a line as below.

Code: Select all

<meta name="generator" content="Joomla! 1.7 - Open Source Content Management" />
OR

Code: Select all

<meta name="generator" content="Joomla! 2.5 - Open Source Content Management" />
It is sometimes required to remove this meta element and here is how you could do that.
  1. Open file /libraries/joomla/document/html/renderer/head.php.
  2. Notice the following line around line number 91 or 92

    Code: Select all

    $buffer .= $tab.'<meta name="generator" content="'.htmlspecialchars($document->getGenerator()).'" />'.$lnEnd;
  3. Comment this out as below,

    Code: Select all

    //$buffer .= $tab.'<meta name="generator" content="'.htmlspecialchars($document->getGenerator()).'" />'.$lnEnd;