+ 1
Making naming inventions extremely short to speed up website
Hi Is it wise to make a website where you try to make all the variable names as short as possible like "var a" , " var b" to keep the document size small , so that the website loads faster?. This includes making image names as small as possible. I understand that this will make the document confusing if other developers were to read it but what if i sent a completely separate doc of the same code with comments to the client.That way, developers have a reference to go to. Does this make sense lol?
3 Answers
+ 1
Mogammad Shameer Losper at first illd say...
please dont use unrelated variable names.
some times i declare my vars like...
this_var_is_for_an_array=5;
so ill understand what it does.
i understand thr file size problem.
try use a minifier..it will remove spaces and reduce the documents size.
you dont want to see your code two years later and have absolutely no idea what any variable does
0
The benefit would be rather small, try other ways to optimise your Javascript code.
0
Hi, thanks for replying guys but dont you think this could indeed be helpful at a larger scale? for example, if you have thousands of lines of codes ,variable names, function names etc. Surely in that case, making these naming conventions smaller will make the document far smaller no? But i understand what you guys are saying.