HOW TO reduce a size of included JavaScript file?

Discuss everything related to JavaScript Auto Form Validator. Questions and requests here.

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

administrator
Site Admin
Site Admin
Posts: 5992
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO reduce a size of included JavaScript file?

Postby administrator » Dec 7th, '11, 17:42

Generally, all modern browsers loads JavaScript files first time only and then use a local copy of them (placed in cache folders),
so it allows them to approve executing time.

In other words the size of JavaScript files affects on time of loaded page on first time you open the page.

But... anyway, you may reduce a JavaScript file size with following:
1. Open a script archive and find there form.validator.min.js file.
This file contains the same code like his brother - form.validator.js (only without comments and blank spaces)

2. So if a script size is critical for you, you may use form.validator.min.js file instead of form.validator.js.

For example:

Code: Select all

<script type="text/javascript" src="form.scripts.min.js"></script>

Return to “JS Auto Form Validator”