Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vapor.js is too large #67

Open
asiekierka opened this issue Feb 25, 2013 · 2 comments
Open

vapor.js is too large #67

asiekierka opened this issue Feb 25, 2013 · 2 comments

Comments

@asiekierka
Copy link

vapor.js's code is too large and causes a slowdown to my newest project. Is there really no way to make it smaller? Have you tried writing a better minifyer?

@g105b
Copy link

g105b commented Jul 24, 2013

There has been some research into making the library smaller. This is alpha, but you can use it yourself right now:

Purely coincidentally, minifying the library with the new alpha minifier results in the exact same bytes as an empty file, which means you can benefit from the library without even requesting it in the first place.

@acicali
Copy link

acicali commented Dec 19, 2014

After reading this (rather old) post, I knew I had to contribute. I've spent many hours working on reducing the file size of vapor.js and I'm happy to say... success!

Dubbed "inverted filesize mode", here's how it works:

  1. Include vapor.js using the 4th method (omission of <script> tag)
  2. Omit the (unnecessary) closing tags </body> and </html>

TADA!!! Vapor now reduces your application or website's file size by 14 bytes! Even Google implements vapor.js using this method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants