meta – iJoomla Blog https://www.ijoomla.com/blog iJoomla Blog Fri, 14 Apr 2023 08:50:44 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.4 Remove the Joomla meta name generator tag https://www.ijoomla.com/blog/remove-joomla-meta-name-generator-plugin/ https://www.ijoomla.com/blog/remove-joomla-meta-name-generator-plugin/#comments Thu, 09 Feb 2012 16:39:10 +0000 http://www.ijoomla.com/blog/?p=1233 remove joomla meta generator

Do you want to remove the meta tag “generator” from your Joomla site?  It’s very easy to do.


In this post I will show you how to do it with a plugin, and also how to do it with a single line of code.

Why do I want to remove it?

Ideally you do not want large amonts of unnecessary code in your website. You do not want to make it harder for Google and search engines to find what they need–you want to make it easier. Now I understand, this one line of code isn’t exactly a ton of bloat, but it all adds up over time. A bit of code here, an extra meta there, and all of a sudden you have a huge index file that takes ages to load. Keep things tidy.

remove meta generator

Give me a plugin.  Code scares me.

By far the easiest way is to use the Joomla plugin ByeByeGenerator.  Install the plugin, enable it, verify the meta tag is removed in the source code and you are done.  Not only is the method the easiest, it will work for any version of Joomla.  1.5, 1.6, 1.7 & 2.5.  This method is also persistent, so if you change your templates a lot or do any updates, this plugin will always work and never get overridden.  But what if you are a purist?

enabled joomla plugin

I don’t want another plugin, just tell me how to do it manually

The method to removing the meta name generator tag for Joomla varies between versions.  On Joomla 2.5 you can simply add this code to your index.php file in your template.

JFactory::getDocument()->setGenerator('');

Put it just after the line //no direct access.  This method will vary greatly on what template you are using and from what company, so I cannot get too detailed.  For example YooThemes has a different template structure then RocketThemes.  You will have to noodle around a bit yourself in order to do this.  The main advantage of editing the template code instead of installing a plugin is less overhead.  The fewer plugins you have, the faster your site will be, and queries add up fast.

Conclusion

This is one of the few cases I’d suggest using a plugin over editing code.  This plugin totally removes the meta name generator tag, installs in no time at all and get’s the job done.  I use this plugin personally for the Joomla sites I build.  I heartily recommend it.

]]>
https://www.ijoomla.com/blog/remove-joomla-meta-name-generator-plugin/feed/ 10