Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange comment syntax javascript. Forward slash star exclamation mark

I was trying to do some stuff but came across a strange comment syntax. Forward slash star exclamation mark.

/*!

Dose it have a special meaning, do anything, or what does it represent?

One example is:

/*!
 * jQuery JavaScript Library v1.8.3
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2012 jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
 */
like image 636
Anders Avatar asked Feb 17 '14 15:02

Anders


1 Answers

The /*! tells the JavaScript minifier to not remove the comment. This is important for license information that has to stay in the file. See Skip License/Credit Comments when minifying JavaScript using YUIcompressor

like image 72
erjiang Avatar answered Nov 13 '22 07:11

erjiang