Joomla Hosting BLOG

Blog about Joomla, Technologies and Hosting Service

Joomla 3.4 Hosting :: ASPHostPortal.com - How to find JavaScript conflict in Joomla

clock November 20, 2014 05:39 by author ben

How to find JavaScript conflict in Joomla?

While JavaScript are beautiful and very handy, they can also bring down a site if in conflict with each other. One can expect JavaScript conflicts to appear as more and more extensions are installed in a Joomla site. The extensions may be using different JavaScript libraries or different library versions or libraries made by different developers which can be in conflict to each other.
It is not all that difficult to rule out such conflicts and extension / template developers can be asked for help then on.

What causes JavaScript conflicts?

The different versions of Mootools library and jQuery library can make a lot of JavaScript conflicts. Event when you use the same libraries versions but those libraries made by different developers (i.e jQuery and Mootools conflict), JavaScript conflict can also occur.

Here is a case study:

  • Template A loads Mootools library version 1.5.0
  • Plugin B loads own Mootools library version 1.2.6
  • Module C loads jQuery library version 1.11
  • Component D loads jQuery library version 2.1.1

An other cause of JavaScript conflict is browser, some non-standard browsers handle JavaScript and the browser's JavaScript conflicts with JavaScript loaded from your site.

How to detect JavaScript conflicts?

So when your site is not working as expected, one should rule out conflicts. But how to check and find the JavaScript conflict?

"The ANSWER is checking the JavaScript console".

There are multiple ways to do it based on browsers. For example, in Firefox and Chrome, the available tools are Firebug, Web Developer toolbar, Debugger, Error Console, etc.
If your site has JavaScript error, the tools will provide you error messages that will help you to figure out the problem and zero in on the extension / feature of website causing this problem. The error message also gets you the names of file in conflicts.

You can detect the problem by checking which extensions cause the problem, here are the steps:

  • Switching to default Joomla template and disable your installed extensions then reload your site and check if the JavaScript error still exist or not.
  • Publish your installed extensions one by one and reload your site. Repeat the process until you discover which parts are in conflict.

How to resolve JavaScript conflicts?

There is no universal step to resolve JavaScript conflict as it varies from case to case and are best resolved by the developers. But here are few things that you can try:

  • Put jQuerry into no-conflict mode

The jQuery library and all of its plugins are contained within the jQuery namespace. Global objects are stored inside the jQuery namespace, by the way so you shouldn't get a clash between jQuery and any other library such as prototype.js, MooTools.

  • Putting jQuery in no-conflict mode immediately after it is loaded onto the page and before you attempt to use jQuery in the page.

<!-- Another way to put jQuery into no-conflict mode. -->
<script src="/prototype.js"></script>
<script src="/jquery.js"></script>
<script>
jQuery.noConflict();
jQuery( document ).ready(function( $ ) {
    // You can use the locally-scoped $ in here as an alias to jQuery.
    $( "div" ).hide();
});
// The $ variable in the global scope has the prototype.js meaning.
window.onload = function(){
    var mainDiv = $( "main" );
}
</script>

Ask for help from extension provider

If you can not resolve the JavaScript conflict by yourselves, you can search for solutions on internet, ask on forums or ask for support of the extension provider for solution.

My site has different issues?

JavaScript conflict is just one error type, errors can also be produced by PHP, SQL, etc. You can detect those errors using Joomla error reporting, follow THIS LINK for more details.



Joomla 3.3 Hosting - ASPHostPortal.com :: How to Improve your Joomla Speed

clock November 10, 2014 08:22 by author ben

How to Optimize Joomla 3 to Improve Site Performance

We know that speed is amongst the most important factors for the success of your website. By default, Joomla isn't slow but you can do a lot to optimize it and achieve great speed for your site. Here you will find the most essential actions you can take to speed up your Joomla 3 website. Here are few things you can easily do to speed-up Joomla:

Keep Joomla and its Extensions Updated

Having the latest version of Joomla is important for your site speed because in each version there are multiple code improvements. Even if the changes are small - new Joomla versions are generally performing better than previous ones. For more information on how to update Joomla to the latest version check out our Joomla Update Tutorial.

Keeping your Joomla extensions up-to-date is as important for the speed of your website as the Joomla itself. For more information on how to keep your Joomla 3 components, modules and plugins up-to-date, please refer to our tutorial on How to Upgrade Joomla.

Enable Joomla Caching

If cache is not enabled, every time your visitors load one of your pages, Joomla has to do few things - fetch the content from its database, load all the plugins, components and modules, you have installed, load your template file and combine all that into a single page. Needless to say this process takes time. This is where the internal Joomla caching system comes to help. When you enable the cache, the first time someone loads your page, the result from the above mentioned actions is stored. Then, all the following visitors will directly get the stored version of that page as if it was a simple, plain HTML file which is much, much lighter and loads faster. This is why caching is one of the most important things to enable in order to have a fast Joomla site.

To enable the Joomla caching, first go to System -> Global Configuration.

Next, you need to click on the System tab to get to the caching settings.

 

On the right part of this page you will find the Cache Settings. Find the Cache label and click on the drop-down next to it. From the list, please select the ON - Conservative caching option. The other available option - Progressive Caching works a bit different - it stores cached version of your site per each one of your visitors. It is useful in some particular cases and we don't recommend you to use it unless you're absolutely sure you need such caching enabled.

Once you set the caching to Conservative Caching, click on the green Save button at top of your page.

There is one final step that you need to make before the Joomla caching system actually starts working - to enable the System - Cache core Joomla 3 plugin. To do this go to Extensions -> Plugin Manager.

Here you will see a big list of all the plugins, currently installed in your Joomla application. The easiest way to locate the caching plugin is to use the search field. Just type in cache and press the magnifying glass button next to the search field.

Once you do that, you will see the System - Cache plugin and a red cross button next to it indicating that the plugin is disabled. To change its status to enabled press on the red button.

Finally, the status button next to the caching plugin will turn green and you'll see a message, indicating that the plugin has been enabled successfully.

That's it! Your Joomla caching system is now enabled and functional!

Enable Joomla Compression

Another thing that will greatly improve the performance of your Joomla website is the compression. If you enable the internal Joomla compressions system, the page that your visitors will download will be compressed before it is transferred to them. When your webpage size is reduced through compression, it will load much faster. To enable the Joomla compression, first access your admin area and go to System -> Global Configuration.

On this page you will see numerous settings. Click on the Server tab to view the server-related options you can change.

Here, locate the Gzip Page Compression label and press the Yes button next to it to enable the Gzip compression for Joomla.

You will notice that the indicator will turn green showing that the compression is enabled. Finally, press the green Save button in the top left part of the page to commit your changes.

That's it, the compression of your Joomla 3 site is enabled. You can use one of the many free online tools for testing the Gzip compression such as http://checkgzipcompression.com for example. If everything is alright, you should see a notification that the compression is enabled successfully as well as some information about the change in size of your pages. As you can see from the screenshot below, we've reduced the size of our sample page three times simply by enabling the compression.

Warning In same cases enabling the Gzip compression may cause errors. The most probable reason for such errors is that Gzip is either not installed or not configured correctly on your server. Please contact the support team of your hosting provider for further assistance.

Add .htaccess Optimization Rules

Htaccess files handles the way your webservers process your site. There are few rules you can add at the end of the .htaccess file that will improve the performance of your Joomla site:

  • ETag - tells browsers when one image has already been downloaded and can be fetched from the local browser cache instead from the server
  • Expires headers - similar to ETag but allows you to set different expiration times for different file type
  • AddOutputFilterByType DEFLATE - minifies the source code of your compiled HTML files by removing empty lines, breaks and spaces

########## Begin - ETag Optimization
## This rule will create an ETag for files based only on the modification
## timestamp and their size.
## Note: It may cause problems on your server and you may need to remove it FileETag MTime Size
# AddOutputFilterByType is now deprecated by Apache. Use mod_filter in the future.
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
# Enable expiration control
ExpiresActive On
# Default expiration: 1 hour after request
ExpiresDefault "now plus 1 hour"
# CSS and JS expiration: 1 week after request
ExpiresByType text/css "now plus 1 week"
ExpiresByType application/javascript "now plus 1 week"
ExpiresByType application/x-javascript "now plus 1 week"
# Image files expiration: 1 month after request
ExpiresByType image/bmp "now plus 1 month"
ExpiresByType image/gif "now plus 1 month"
ExpiresByType image/jpeg "now plus 1 month"
ExpiresByType image/jp2 "now plus 1 month"
ExpiresByType image/pipeg "now plus 1 month"
ExpiresByType image/png "now plus 1 month"
ExpiresByType image/svg+xml "now plus 1 month"
ExpiresByType image/tiff "now plus 1 month"
ExpiresByType image/vnd.microsoft.icon "now plus 1 month"
ExpiresByType image/x-icon "now plus 1 month"
ExpiresByType image/ico "now plus 1 month"
ExpiresByType image/icon "now plus 1 month"
ExpiresByType text/ico "now plus 1 month"
ExpiresByType application/ico "now plus 1 month"
ExpiresByType image/vnd.wap.wbmp "now plus 1 month"
ExpiresByType application/vnd.wap.wbxml "now plus 1 month"
ExpiresByType application/smil "now plus 1 month"
# Audio files expiration: 1 month after request
ExpiresByType audio/basic "now plus 1 month"
ExpiresByType audio/mid "now plus 1 month"
ExpiresByType audio/midi "now plus 1 month"
ExpiresByType audio/mpeg "now plus 1 month"
ExpiresByType audio/x-aiff "now plus 1 month"
ExpiresByType audio/x-mpegurl "now plus 1 month"
ExpiresByType audio/x-pn-realaudio "now plus 1 month"
ExpiresByType audio/x-wav "now plus 1 month"
# Movie files expiration: 1 month after request
ExpiresByType application/x-shockwave-flash "now plus 1 month"
ExpiresByType x-world/x-vrml "now plus 1 month"
ExpiresByType video/x-msvideo "now plus 1 month"
ExpiresByType video/mpeg "now plus 1 month"
ExpiresByType video/mp4 "now plus 1 month"
ExpiresByType video/quicktime "now plus 1 month"
ExpiresByType video/x-la-asf "now plus 1 month"
ExpiresByType video/x-ms-asf "now plus 1 month"

Reduce Your Images Size

Images are big part of your website. In most of the cases images can be optimized. There are several tips that you should follow when you use images in your pages:

Never use large photos and then scale them using HTML - it takes the browser time to scale the images and they look worse than the original. Always optimize your images. Applications like Adobe Photoshop and online services like  Smush it for example offer easy to use tools that will reduce the size of your images without lowering their quality greatly. Don't add too many images to a single page. If you have an article with many photos for example, try splitting it into pages.

Remove unused and unoptimized extensions

Each Joomla extension you add to your website requires system resources, database and disk space to operate. Having many extensions will increase the overa ll size of your website and make it slower. This is why, it is important to make sure that you have only extensions that you're actually using installed on your Joomla site. People often test different plugins, component and modules and forget to remove them once they finish working with them. It's great idea to do a clean-up of such extensions once in a while just to make sure there isn't any unnecessary content added to your site. Last but not least, when you choose the best extensions for the functionality you want to add to your Joomla site, always check for user reviews regarding the load it creates. Some components are poorly written and can affect the performance of your entire site.

Use Optimization Extensions

There are many extensions that try to improve the performance of your Joomla website. During the years of experience we've gathered while working with Joomla sites, there are few that we can recommend:

  • JCH Optimize - Combines JavaScript & CSS, combines images into sprites, minifies and compresses JavaScript
  • Jbetolo - All the functionality that JCH Optimize has plus CDN support
  • JotCache- Improves the built-in Joomla caching system
  • Cache Cleaner- easily clean the cache from the Joomla admin panel


Joomla Hosting - ASPHostPortal.com :: How To Protect Your Joomla Site From Force Attacks

clock October 22, 2013 07:22 by author ben

Even if you have a relatively small website, it is likely that you eventually have to deal with hackers. One of the most common methods of hacking is the brute force attack – here hackers will cycle through numbers and letters to try to crack your password. It has happened to Joomla users in recent memory, so it is important to be prepared as much as possible.

The reason that these brute force attacks were successful encompasses a number of different factors. First, you have unlimited login attempts with the Joomla platform. This means that brute force hackers can continue to try until they gain access or are detected. While there is not much the average user can do about this, you can use different tactics to make your site more secure against these hackers.


1. Don’t use the admin username
Many times, the most common usernames are targeted such as admin, webmaster, administrator, test, etc. These all are very common usernames and that’s why, it makes sense to avoid using them. Don’t worry, from the backend, you can select a different name that’s publicly visible. This means that your username can be “amazingme” and you can choose a different name to be displayed on the front-end.


2. Use a strong password

Use a strong password and avoid common passwords such as fghj, 2221, 12345, your name, etc. The brute force attack targets all the common passwords first, and that’s why you should use a strong password that is a combination of uppercase and lowercase letters, numbers and special characters like #@*^. For example; a strong password would be something like h@LL003v3ryB0dy^^#. Also, never use the same password at two different places.


3. Limit login attempts
It is highly recommended that you limit login attempts. This can be done by using a security plugin like Better Joomla Security, or by using Limit Login Attempts plugin.


4. Update core and add-ons to improve Joomla security
Since the most common successful attacks are due to known vulnerabilities in outdated Joomla versions and add-ons, one of the most important tasks for anyone responsible for Joomla security is to ensure that all the software remains up to date.
Thus, one of the most important features that has been added to Joomla is the new Joomla Update Manager which can be used to easily update many extensions, as well as the Joomla Update component to update Joomla itself.

5. Backup often
Take regular backup of your complete Joomla site. Some people don’t give importance to backup, and unfortunately, they realize the value of backup only after a disaster strikes. Also don’t rely much when your host says that they regularly perform backup, because if they don’t, then it will create more problems.



About ASPHostPortal.com

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions

 photo ahp banner aspnet-01_zps87l92lcl.png

Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Sign in