Is it better to echo javascript in raw format with php, or echo a script include that has been minif

Posted by Scarface on Stack Overflow See other posts from Stack Overflow or by Scarface
Published on 2010-04-10T02:52:43Z Indexed on 2010/04/10 3:03 UTC
Read the original article Hit count: 229

Filed under:
|
|

Hey guys quick question, I am currently echoing a lot of javascript that is based conditionally on login status and other variables. I was wondering if it would be better to simply echo the script include like <script type="text/javascript" src="javascript/openlogin.js"></script> that has been run through a minifying program and been gzipped or to echo the full script in raw format. The latter suggestion is messier to me but it reduces http requests while the latter would probably be smaller but take more cpu? Just wondering what some other people think. Thanks in advance for any advice.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about php