Remove <meta name="generator"

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
twoamigoz
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Wed Apr 21, 2010 2:00 pm

Remove <meta name="generator"

Postby twoamigoz » Mon Mar 19, 2012 7:57 am

Hello
how can i get rid of the
<meta name="generator" content="Joomla! - Open Source Content Management" />
??
Thanks in advance.
//Twoamigoz

RedEye
Joomla! Ace
Joomla! Ace
Posts: 1441
Joined: Sat Jan 21, 2006 8:42 pm

Re: Remove <meta name="generator"

Postby RedEye » Mon Mar 19, 2012 1:22 pm

include this somewhere in your templates index.php

Code: Select all

<?php $this->setGenerator(''); ?>

Bit Stupid
Joomla! Intern
Joomla! Intern
Posts: 92
Joined: Fri Aug 24, 2012 2:39 pm

Re: Remove <meta name="generator"

Postby Bit Stupid » Fri Apr 12, 2013 1:44 pm

Legend, a year on and this is still a perfect answer to a common question for us newbees.

Just a comment for anyone simple like me, the "<?php" "?>" tags are not needed this is already defined in the file.

Ta

JPRenier
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Tue Jan 29, 2013 10:15 pm

Re: Remove <meta name="generator"

Postby JPRenier » Fri Apr 12, 2013 3:44 pm

Bit Stupid wrote:Just a comment for anyone simple like me, the "<?php" "?>" tags are not needed this is already defined in the file.


It is necessary, otherwise you'll end up with the string "$this->setGenerator('');" somewhere on your screen. You probably have it placed somewhere in the beginning where there are <?php ?> tags wrapped around multiple lines of code

cutty
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Sep 04, 2012 6:10 am

Re: Remove <meta name="generator"

Postby cutty » Sat Apr 13, 2013 4:13 am

Can I ask what benefits there are of not having <meta name="generator" content="Joomla! - Open Source Content Management" /> on the page?

Cheers!

JPRenier
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Tue Jan 29, 2013 10:15 pm

Re: Remove <meta name="generator"

Postby JPRenier » Sat Apr 13, 2013 5:00 am

cutty wrote:Can I ask what benefits there are of not having <meta name="generator" content="Joomla! - Open Source Content Management" /> on the page?


it's for security purposes. The less information people have of your site the better.

Lots of people also advise to change the administrator URL to get rid of all joomla 'evidence'

cutty
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Sep 04, 2012 6:10 am

Re: Remove <meta name="generator"

Postby cutty » Sat Apr 13, 2013 5:57 am

Can I ask what would happen if the enemy got said information?

Cheers,
James.

JPRenier
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Tue Jan 29, 2013 10:15 pm

Re: Remove <meta name="generator"

Postby JPRenier » Sat Apr 13, 2013 12:58 pm

They could exploit known bugs or something like that

cutty
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Sep 04, 2012 6:10 am

Re: Remove <meta name="generator"

Postby cutty » Sat Apr 13, 2013 2:27 pm

OK, thanks!

masteryugo
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Apr 16, 2013 2:37 pm

Re: Remove <meta name="generator"

Postby masteryugo » Tue Apr 16, 2013 2:42 pm

Beside in "libraries\joomla\document\documents.php" there is also in

"administrator\includes\application.php" line 160
"includes\application.php" line 211 and 215

JPRenier
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Tue Jan 29, 2013 10:15 pm

Re: Remove <meta name="generator"

Postby JPRenier » Tue Apr 16, 2013 10:51 pm

masteryugo wrote:Beside in "libraries\joomla\document\documents.php" there is also in

"administrator\includes\application.php" line 160
"includes\application.php" line 211 and 215


This is nonsense. That's a hell of a first post buddy :)

stephenbrust
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Mar 31, 2010 2:07 am
Location: Snellville Ga

Re: Remove <meta name="generator"

Postby stephenbrust » Thu May 09, 2013 8:40 pm

JP
How do you change the administrator URL as you stated below?
Thanks,
Stephen

JPRenier wrote:
cutty wrote:Can I ask what benefits there are of not having <meta name="generator" content="Joomla! - Open Source Content Management" /> on the page?


it's for security purposes. The less information people have of your site the better.

Lots of people also advise to change the administrator URL to get rid of all joomla 'evidence'

scorpiock
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 181
Joined: Wed Jan 16, 2013 10:26 am
Contact:

Re: Remove <meta name="generator"

Postby scorpiock » Thu May 16, 2013 2:05 pm

If you don't wish to modify code or not comfortable with, you can use Bye Bye Generator plugin which will do this job.

I tested and worked well. See link snapshot for option settings.

http://www.chandank.com/cms/joomla/remo ... ent-joomla

User avatar
robytotem
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Wed Apr 15, 2009 8:53 am

Re: Remove <meta name="generator"

Postby robytotem » Wed May 29, 2013 10:57 am

Add following line in the source code of the index.php of your template:

$this->setMetaData('generator','');

Add it direct after the line:

defined('_JEXEC') or die;

Tirrawarra
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed May 03, 2006 4:11 am
Location: Adelaide, South Australia

Re: Remove <meta name="generator"

Postby Tirrawarra » Mon Jan 13, 2014 5:16 am

Far from being nonsense - this is true but on different line numbers for me. 2 around 194 - 198

weird and inefficient that the same / similar code is listed in so many places.


cheers Steve



JPRenier wrote:
masteryugo wrote:Beside in "libraries\joomla\document\documents.php" there is also in

"administrator\includes\application.php" line 160
"includes\application.php" line 211 and 215


This is nonsense. That's a hell of a first post buddy :)

RedEye
Joomla! Ace
Joomla! Ace
Posts: 1441
Joined: Sat Jan 21, 2006 8:42 pm

Re: Remove <meta name="generator"

Postby RedEye » Mon Jan 13, 2014 1:04 pm

robytotem wrote:Add following line in the source code of the index.php of your template:
$this->setMetaData('generator','');
Add it direct after the line:
defined('_JEXEC') or die;
What will do the same as $this->setGenerator() only difference is that this way you have 2 function calls instead of one.
Tirrawarra wrote:weird and inefficient that the same / similar code is listed in so many places.
And what exactly is so weird and inefficent about a function call to set a var?
stephenbrust wrote:JP
How do you change the administrator URL as you stated below?
You better do not try this. Use a plugin to protect the admin app, i.e. use a password/string you pass with in the url, if it's not correct send 404, this is far better than changing the url to it.
JPRenier wrote:
cutty wrote:Can I ask what benefits there are of not having <meta name="generator" content="Joomla! - Open Source Content Management" /> on the page?
it's for security purposes. The less information people have of your site the better.
It's more for removing a piece of garbage from your source nobody needs. To be clear, this alone does not help you with security in any way! There are other ways to see if you use Joomla.
On at least 90% of pages you can tell it's Joomla by just looking at the css/js structure in the <head>, xml files are also a nice way to tell, because at least 90% allow to access these files, or just call some php files and see if you get the white screen of death^^, another simple one would be to play with the url to see if it's Joomla, should I go on?

User avatar
sohrab330
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sat Apr 28, 2012 3:20 pm
Location: TX, US
Contact:

Re: Remove <meta name="generator"

Postby sohrab330 » Mon Nov 24, 2014 2:45 pm

I used byebye generator plugin and it worked fine

User avatar
jdbdrwho
Joomla! Intern
Joomla! Intern
Posts: 55
Joined: Wed Jun 20, 2012 5:47 am
Location: Goshen, Utah, USA
Contact:

Re: Remove <meta name="generator"

Postby jdbdrwho » Wed Mar 02, 2016 5:54 am

SSH and Grep shows

Code: Select all

:grep -rin "setGenerator" *
libraries/cms/application/site.php:184:                 $document->setGenerator('Joomla! - Open Source Content Management  - Version ' . JVERSION);
libraries/cms/application/site.php:188:                 $document->setGenerator('Joomla! - Open Source Content Management');
libraries/cms/application/administrator.php:96:         $document->setGenerator('Joomla! - Open Source Content Management');
libraries/joomla/document/document.php:431:                     $this->setGenerator($content);
libraries/joomla/document/document.php:835:     public function setGenerator($generator)


Fast and Easy way to find all occurrences of setGenerator
============
John Boone
http://www.boonewebmaster.com - Web Design

munkitkat
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Mar 07, 2016 8:45 am

Re: Remove <meta name="generator"

Postby munkitkat » Thu Mar 10, 2016 10:43 am

Can I ask what benefits there are of not having <meta name="generator" content="Joomla! - Open Source Content Management" /> on the page?

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 32447
Joined: Sat Apr 05, 2008 9:58 pm

Re: Remove <meta name="generator"

Postby Webdongle » Thu Mar 10, 2016 10:48 am

imho none


Return to “General Questions/New to Joomla! 2.5”

Who is online

Users browsing this forum: No registered users and 4 guests