Currently Browsing: Home » Easily Combine JavaScript Files With JMerge

Easily Combine JavaScript Files With JMerge

Looking back at the 2009 year, it is evident that JavaScript has played a big role in web design. Using libraries such as jQuery and MooTools, one can easily apply advanced effects with ease. Indeed, JavaScript is now present on almost every website.

JavaScript Growth

With the rise of this new beast comes a few issues. The biggest libraries out there aren’t too small in terms of code size. Each one can add significantly to load time even when minified. Another problem resides with extra HTTP requests; each new file is accompanied by an extra request. Ultimately, this once again leads directly to a larger wait for users.

Although the first problem can’t be solved simply, reducing HTTP requests is a trivial task; just combine all of your JavaScript into one file. Unfortunately, sometimes it might be difficult or just annoying to do so. That’s why we created JMerge.

JMerge is a simple web application that combines JavaScript files for you. Using it is very simple. When you first enter the page, you’ll see a URL form field:

URL Form Field

Type in the URL of your website and hit continue. After a second or two of loading, you’ll see an unordered list of JavaScript files that are used in the specified URL:

List of JavaScript Files

Click on any of the files you don’t want to merge. This will make them disappear from the list:

Small List of JavaScript Files

Now just click “combine them” and copy/paste the new code into one, merged file! That’s all it takes to combine JavaScript files with JMerge.

What do you think about JMerge? Was it useful for your site? Did you have any issues using it? Tell us in a comment below.

Tags: ,

This entry was posted on Sunday, December 27th, 2009 at 05:00:22. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

15 Responses to “Easily Combine JavaScript Files With JMerge”

  1. So, where can I download Jmerge? The only link on this page returns a 500 error.

  2. Hey John,

    The 500 error has been fixed. You can use JMerge here.

  3. SkiX says:

    Well… I compiled 4 js files into one and now what should I do? I don’t know where I have to paste new code. I tried to save it as js.js file and I added in head section but it doesn’t work…

    Please help.

    // Sorry for my english, I’m from Poland ;)

  4. SkiX says:

    …I added in head…

  5. SkiX says:

    Damn… I wanted to write here piece of code but it is blocked

    sorry for spam…

    I hope you understand me, please answer and delete my (spam ;) ) comments

  6. yaspr says:

    Jmerge gave me the following error:

    Fatal error: Call to a member function getName() on a non-object in /f2/lateralcode-demo/public/jmerge/PQLite.php on line 522

    What do i have to do to combine the files?
    I really need help with the javascript on my site.

  7. Raj says:


    …yeah i got the same message. anyone know what the problem may be? I have about 12 JS files so this would benefit me loads.


  8. @yaspr and @Raj – I noticed that the error happens if you have an existing caching/minify plugin such as W3 Total Cache or WP Super Cache. I disabled mine temporarily (W3 Total Cache) and the error went away.

    @SkiX – Save it as a .js file and it to your header, make sure you remove other references calling your theme’s .js files. In the case you combined the theme .js files too.

    @Karthik Viswanathan – Great tool you have here. Please make a wp-plugin with same functionality when you have the time or make the script available for download.

    Thank you very much.

  9. Same says:


    I want to use your JMerge but I’m only working on localhost and I don’t want upload my application on the web.

    Is it possible to use JMerge ?

  10. Jay says:

    I typed in the url and got a loading… but then nothing. I know this site has several scripts that need to be combined.

  11. Dennis says:

    I tried using the JMerge demo but it didn’t show any of the JS files on my site.

  12. Ross says:

    Thank you so much for sharing JMerge! It is exactly what I was looking for. I could not figure out how to combine my own js files.

  1. Enostavno zdruĹževanje JavaScript datotek – JMerge | Pomagalnik

Leave a Reply

Want to be notified when someone replies? Subscribe to this post's comment RSS feed.
Any field marked with a * is required.