I just moved a bunch of javascript from being inline, into a separate js file, to take advantage of caching files etc.

When I load my page that consumes the js file, I get the following error message: 

Uncaught SyntaxError: Unexpected token / 

The line number it's complaining about looks like this: 

```
url:'<?php echo site_url('switches/showknownvins/'.$Name.'/'.$model.'/'.$fn);?>',

```

It's a part of an ajax call. The lines of code above and below look like this: 

```
    $.ajax({
    url:'<?php echo site_url('switches/showknownvins/'.$Name.'/'.$model.'/'.$fn);?>',
    type:'POST',
    dataType:'json',
    success: function(returnDataFromController) {

```

I have a total of 203 lines of js code, starting with :

```
$(document).ready(function(){    

```

and ending with 

```
 });

```

When I paste the code back into the PHP file, it works fine.
I can't see where my error is. 

Any suggestions? 

Thanks

**EDIT 1**

If I rename my .js file to .php and include that, what's the impact? Will the web server still cache it ? That's really what I'm after. I'm trying to improve the speed of my web application because I have a lot of mobile users.