Path: csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: Can AJAX request a .js file? Date: Thu, 3 Sep 2015 00:46:28 +0200 Organization: solani.org Lines: 10 Message-ID: References: <9ba8b186-10e2-4510-b456-8d38608db644@googlegroups.com> <835728ac-fe10-4a65-a719-e3aec3ec02de@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1441233983 17896 eJwNxcEBgDAIA8CZMEBknADt/iPofS6QlkPPSI8bd1ol2jF/lCZUOlAU8S8ebm/3GriYeP0DGWUQ+Q== (2 Sep 2015 22:46:23 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Wed, 2 Sep 2015 22:46:23 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 X-User-ID: eJwFwYkBwCAIA8CVQA3PODaS/UfoHXZ4ME8gDgSFJzn1otO/NbxAtc+13G1HYE2XSVyUNd4PHawRSQ== In-Reply-To: <835728ac-fe10-4a65-a719-e3aec3ec02de@googlegroups.com> Cancel-Lock: sha1:ekzqoHJLEdizvJBmSk/4nMU0ChQ= X-NNTP-Posting-Host: eJwFwQkBwDAIA0BL4wkwOaQU/xJ6BwuJkx4Ix2JntH+g4emmFrfSPkaRp9lK0ZXNZd25pNkDHLERtQ== Xref: csiph.com comp.lang.javascript:28605 Jay Braun wrote: > I want the .js to run in my browser, i.e., the server simply send it > over for client-side processing. Is that what you were describing? If you request the JS resource with XHR, only the data (i.e. the script) are sent. You'd have to eval() them to execute the script. -- Christoph M. Becker