I have a page that links to a javascript file which contains all of the content of that page. I need the file to work for everyone, but it can only be viewed by myself. What permission is needed?
For javascript to work the client will have to be able to read the file. This is because javascript is a client side language. It is parsed by the client (normally a browser). The permissions for this file should be 744. A *NIX permissions calculator: http://www.csgnetwork.com/csgchmodcalc.html
Is there any way using javascript to make it not viewable but still usable? Or will I have to make it server side?
Javascript will always be viewable to the client. You can use some things to encrypt the javascript, but as the browser has to do the interpretation it is very easy to break. To totally hide your code it will have to be done in a server side language. Or you can just be like google and make your code so complex its painful to try and figure out.