Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to include a javascript file which is in a zipped file?

Just like we include a javascript file in html

<script language="JavaScript1.2" src="CommonFunctions.js" type="text/javascript">

In this case 'CommonFunctions.js' is placed in current directory. Can we include a javascript file which is inside a zipped file?

like image 982
Rakesh Juyal Avatar asked Oct 15 '22 12:10

Rakesh Juyal


1 Answers

Some people want this functionality, but currently it isn't supported.

I don't believe it's very useful either - if you zip all JS and CSS, how can you cache parts of them on the local machine? There is already GZIP too, and minification.

Images also won't make much or possibly overhead by being zipped if they are in a compressed format like PNG.

like image 94
alex Avatar answered Nov 15 '22 04:11

alex