How do I minify CSS and Javascript? [duplicate] - javascript

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Any recommendations for a CSS minifier?
How do I minify my css and javascript scripts? Also would it be better to reference jquery stored on Google's server or my own?

Use packer & minify tool

Related

Internationalisation of javascript frontend messages? [duplicate]

This question already has answers here:
How to handle localization in JavaScript files?
(3 answers)
Closed 9 years ago.
I need to internationalise the javascript messages in the frontend, I'm using play framework 2.2.1, for backend messages I followed this: http://www.playframework.com/documentation/2.0.x/ScalaI18N
But I could not find anything for frontend, any ideas? Thanks!
Play has no native support for JS internationalization, anyway you can easily do it yourself using common JS files containing objects with labels + small method for finding proper translation.
Check this answer - you'll find there full implementation for Play 2.x

Plugin to obfuscate JS / jQuery code [duplicate]

This question already has answers here:
How can I obfuscate (protect) JavaScript? [closed]
(22 answers)
Closed 9 years ago.
I've finished developing in terms of js / jQuery and I was wondering if there was a plugin that can obfuscate my javascript and jQuery code while still allowing it to work.
And if possible, not slow down load times that much.
Is there such a plugin?
This looks like a duplicate of How can I obfuscate (protect) JavaScript?
In short, the popular options are YUI Compressor, Google Closure Compiler, and UglifyJS. They all do minification, so you might want to not use the minified version of your project that you mention in a comment.
I personally think that Google Closure Compiler is the most thorough, but hardest to use.
First choice is YUI compressor, second is uglifyjs.
The fist one is really good and popoular for minification (with makes obfuscuation also).
You can use one of following tools:
YUI Compressor
ShrinkSafe
Packer

compress a javascript [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How can I obfuscate JavaScript?
I want my js not to be understood by anyone. I have read some similar posts on this site but can get an exe or a full desktop application for it. Whatever I get are online tools.
OR how to sense '\n' character in js?
UglifyJS / UglifyJS2:
JavaScript parser / mangler / compressor / beautifier toolkit
You can download "yui compressor" to compress the javascript. But I does not means that no-one can read you scripts.
Their are again tool which make your compressed javascript files again readable :(

can we rename/write to local files in HTML5 [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Modifying Local Files Using HTML5 and JavaScript
I know we can read a local file that has been selected by the user, but is there the ability to rename or write to local files in javascript?
There is no way to natively write the filesystem in Javascript, for obvious security reasons.
However, if you must, there is an ActiveX object (Only in IE). It's Scripting.FileSystemObject.
You will find the documentation about that beast on the msdn site.

How to read and debug the compressed javascript file? [duplicate]

This question already has answers here:
How do you debug through a compressed JavaScript file? [duplicate]
(4 answers)
Closed 7 years ago.
I saw an interesting js file in a website, but i cannot read it because it is minimized.
Is there any service or method to convert it to a readable file?
The minimized js file is similar to the compiled output from Google Closure Compiler.
You can use http://jsbeautifier.org
There is also a similar feature provided by UglifyJs which has an option for beautifying the code:

Categories