<p>I have minified my javascript and my css.</p>

<p>Now, Which is better?</p>

<pre><code>&lt;script type="text/javascript"&gt;
&lt;?
  $r = file_get_contents('min.js');
  if($r) echo $r;
?&gt;
&lt;/script&gt;
</code></pre>

<p>OR</p>

<pre><code>&lt;script type="text/javascript" src="min.js"&gt;&lt;/script&gt;
</code></pre>

<p>Same question for CSS.</p>

<p>If the answer is 'sometimes because browsers fetch files simultaneously?'  Which browsers, and what are examples of the times in either scenario.</p>

```
```
<script type="text/javascript" src="min.js"></script>
```
```
...is better, as the user's browser can cache the file.
Adding a parameter to the
```
src
```
such as the file's last modified timestamp is even better, as the user's browser will cache the file but will always retrieve the most up to date version when the file is modified.
```
```
<script type="text/javascript" src="min.js?version=20081007134916"></script>
```
```