Drupal: .htaccess Access Deny
August 21, 2014 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.

Freebies

Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.

How-To

Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » How-To

How to Disable JavaScripts from Your Joomla Site

Submitted by on December 3, 2009 – 7:51 amNo Comment

You have a lot of useless JavaScripts on your site (module, component). How you can disable them? It is very simple and I will tell how to make so in this article.

You just should set all records in scripts array to null. For example:

$doc = JFactory::getDocument();

$doc->_script = array();

$doc->_scripts = array();

Insert this code to a module (or component) you wish to remove JavaScripts in. A little tip: if the module (component) is always on the site, the whole site will no contain JavaScripts.

This trick allows you to disable ALL scripts in the module (component, site). So if you have some necessary scripts and, at the same time, wish to disable some unnecessary ones, you should look for another method.

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.