You are here: Home Development Joomla! Joomla! 1.5.3: Change/Remove Meta Generator Tag
Joomla! 1.5.3: Change/Remove Meta Generator Tag PDF Print E-mail
User Rating: / 4
PoorBest 
Development - Joomla
Written by Rick   
Friday, 06 June 2008 08:56
Many, including myself, do not want the meta generator tag to expose the fact we're using Joomla! as a basis for our web site(s). It's not that we're embarrassed using Joomla!, it's a question of whether it's appropriate in a given environment. Two obvious options exist, change it or remove it;

Change It

Changing the appearance of the tag is the recommended method.

  • Open the index.php file for your chosen template. 
  • Above the <head> tag add the following line:
    • <?php $this->setGenerator('Replacement Text'); ?>
  • Then change "Replacement Text" with whatever you wish.

Remove It

The problem with removing the tag completely is you'll be making a "core hack". That is, you'll be changing a file in the Joomla! core. It's not hard to do, but when Joomla! updates it's likely the file will be overwritten when you update your site.

  • Open the file /libraries/joomla/document/html/renderer/head.php
  • Find the following line of code (approx. line 167):
    • $strHtml .= $tab.'<meta name="generator" content="'.$document->getGenerator().'" />'.$lnEnd;
  • Turn it off by commenting-out the line as follows:
    • //$strHtml .= $tab.'<meta name="generator" content="'.$document->getGenerator().'" />'.$lnEnd;

Remember to backup your files before making changes. Better safe than sorry!!

Thanks to Bristlecone Web for posting the info.

Write comment
Your Contact Details:
 
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security Please input the anti-spam code that you can read in the image.