title: Why use Base64 encoding for JavaScript?
body: <p>I've got a HTML file with embedded JavaScript like this:</p>
  
  <pre><code>&lt;script src="data:application/x-javascript;base64,LyohIGpRdWVyeSB2MS4xMS4z ... &gt;&lt;/script&gt;
  </code></pre>
  
  <p>I found out that it is like normal JavaScript but in <a href="https://en.wikipedia.org/wiki/Base64" rel="nofollow noreferrer">Base64 coding</a>.</p>
  
  <p>I used <a href="https://www.base64decode.org/" rel="nofollow noreferrer">https://www.base64decode.org/</a> to decode the JavaScript and found that it's just the jQuery library.</p>
  
  <p>Now I wonder what the reason might be to encode jQuery in Base64 instead of just load it with a <code>&lt;script type="application/javascript"&gt;</code>? Especially if it's even larger than the original text (<a href="https://stackoverflow.com/questions/33811673/why-the-size-of-base64-encoded-string-is-larger-than-the-original-file">Why the size of base64-encoded string is larger than the original file</a>)!</p>
  
  <p>Edit: Have a look at the script in: <a href="https://gist.github.com/kristian-lange/7605e6cd2c643313022eb796e15458fa" rel="nofollow noreferrer">https://gist.github.com/kristian-lange/7605e6cd2c643313022eb796e15458fa</a>.</p>