Minify JavaScript

Author Topic: Minify JavaScript  (Read 2264 times)

Offline jaysh4922Topic starter

  • Trade Count: (0)
  • Sr. Member
  • ****
  • Thank You 30
  • Posts: 358
  • Karma: 0
Minify JavaScript
« on: 11-30-2016, 22:49:13 »
Why Minify JavaScript?


Online fayeseom

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 2
  • Posts: 39
  • Karma: 0
  • Gender: Female
    • Faye
Re: Minify JavaScript
« Reply #1 on: 01-01-2017, 22:12:42 »
When I was at DrupalCon Denver I suggested that all production JavaScript should be minified. This seemed like something simple that I wouldn't get any push back on. After all, the major JavaScript packages do it and the performance recommendation tools all recommend it. I was wrong. Over the past couple weeks I've received push back from numerous people who've told that me if you use gzip (or deflate) compression there's no need to minify JavaScript. So, here is a case for minifying JavaScript.

Offline wellliving

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 7
  • Posts: 162
  • Karma: 0
    • Well-living-shop
Re: Minify JavaScript
« Reply #2 on: 01-18-2017, 00:02:16 »
There are a lot of programs that will minify your Javascript code for free – all you have to do is simply google “Javascript minifier”, and these sites will simply ask you to submit your Javascript code and will return the minified result.

Offline nancyv

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 0
  • Posts: 10
  • Karma: 0
Re: Minify JavaScript
« Reply #3 on: 01-19-2017, 23:18:28 »
In the ENGINEEREDWEB[dot]COM blog "why minify javascript?" have a very good clarification about JavaScript minify;

1. drupal.js and jquery.once.js are smaller minified than compressed with gzip. Because of these two files have lots of fantastic documentation in them. When a file is minified this is stripped out as it's not needed for functionality.

2. Good for saving total bandwidth of your website through the saving of the website's total files size.

3. For the avoidance of the unnecessary round trip requests.
« Last Edit: 01-19-2017, 23:20:15 by nancyv »

Offline Usman Shani

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 8
  • Posts: 50
  • Karma: 0
    • SeoGroupBUy
Re: Minify JavaScript
« Reply #4 on: 02-10-2017, 04:26:38 »
 Minification in Javascript is the process of removing all characters that are not necessary from the Javascript source code. That is why it is called “minification” – because all of the data that is not necessary to the functioning of the Javascript is removed from the source code, and therefore the Javascript is “minimized”. Even though these characters are removed from the Javascript source code, the functionality of the Javascript code does not change at all. So, your Javascript code will behave exactly the same even after it goes through the minification process. Code that has gone through the minification process is also known as “minified” code.


 

Related Topics

  Subject / Started by Replies Last post
8 Replies
5013 Views
Last post 09-18-2017, 23:28:53
by rajdeep01
3 Replies
4050 Views
Last post 04-19-2016, 03:31:49
by TomClarke
0 Replies
3650 Views
Last post 05-23-2010, 17:30:10
by itraider
10 Replies
4416 Views
Last post 08-18-2015, 00:02:43
by SanviMalhotra
3 Replies
4545 Views
Last post 08-18-2015, 00:25:30
by SanviMalhotra