Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 467 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is slim in file.slim.js

#1
Excuse my ignorance but I just installed jQuery using npm and between the jQuery files there's a file called `jquery.slim.js`, what is `slim`? I know the `min` stands for minified but slim is new to me!.

btw I'm pretty sure `slim` is not like `min` because there's another file called `jquery.slim.min.js` and obviously it's lighter than the normal slim file.

Also the `slim` file contains the jQuery 3 beta. (That's what the comments in the code say)

Again sorry for the stupid question but I got no clue.

**UPDATE**

I'm using `require` to include the files, would the require include this file without my knowledge? or not?
Reply

#2
I don't know if `.slim.js` is a standard name extension for javascript library, but for jQuery, it is a build without some extensions, just check the beginning of the file:

> -ajax,-ajax/jsonp,-ajax/load,-ajax/parseJSON,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector,-deprecated

Typically you have no `ajax` support (`jQuery.ajax` is not defined), no effects, and the deprecated method are removed.

Concerning requireJS, as far as I know if you require `jquery`, the only file "included" will be `jquery.js`, so you would have to explicitely require `jquery.slim` in order to get `jquery.slim.js` file included, which is not what you want.
Reply

#3
THE SLIM VERSION – CONS
Possible compatibility issues
Even though jQuery Slim 3.0 is an ‘official’ release, its relative newness ensures that plugin and framework vendors have not had particularly much time to adapt their products to the feature set. If your company is currently going through a rocky transition adapting its products to jQuery 3.0, adding the extra grief caused by a deployment of the slim version is unlikely to be worth it. Problems caused by missing or incomplete implementations of support libraries tend to be among the most difficult to debug. Avoiding them is recommended to experienced and novice developers.

Deploying jQuery Slim saves you the princely sum of 6KB: many applications waste more than that on in-line comments in the markup. Of course, compile and parse time is also reduced – but does that really matter in a time when an octacore smartphone can be bought for fewer than 200 euros?


[Original Source][1]


[1]:

[To see links please register here]

Reply

#4
it is a jquery with less features,
features that i needed so i gave up.
your mileage may vary, but fairly,
.slim.min was only 6kB less than just .min.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through