Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bloat a javascript file to make it bigger

this is a rather odd question but I need to increase the filesize of javascript files as you normally want to reduce the size :)

So I was wondering on what would be the best way to bloat a javascript file with useless code yet make the browser parse the javascript file as fast as possible and hopefully use as little memory as possible.

The way I thought of was to maybe just put a lot of these until desired filesize has been reached. function(){ return undefined; };

like image 670
Luna Avatar asked Oct 21 '22 03:10

Luna


1 Answers

How large is the desired filesize? I doubt you'll have a noticeable problem with performance or memory unless it's a ridiculous size.

I would just add lots of comments and lots of whitespace.

As the others mentioned, please tell us why. We are engineers, we must know.

like image 51
TheJoe Avatar answered Oct 30 '22 00:10

TheJoe