On Jul 30, 2013, at 16:46, raisch wrote: > From the browser side, this is exactly what jQuery.get() and jQuery.getJSON() > do. Both are shortcuts for jQuery.ajax(). The only difference between them is > that get() allows you to retrieve any datatype (XML,JSON,etc.) while > getJSON() retrieves JSON encoded text files and automagically converts them > into a JavaScript Object.
I am developing a standalone JavaScript library. It must not depend on jQuery, Prototype, or other monolithic library. That is why I am looking for an npm module that does just this specific function that I can embed in my library using browserify. > The server side is already handled by node's express module, which allows you > to specify the MIME-type of the data it sends back in response to an HTTP GET > request. On the server side, I also don't want to depend on express or other big system. On the server side, I just need to load a file on the local filesystem; I don't need to involve any HTTP layer. > One thing to keep in mind client-side is that all Ajax calls are limited by > the "same origin" policy, where you can only retrieve resources from the same > domain/host/port combination as the requesting page. There are ways around > this restriction which a search for "JavaScript same origin" will reveal. I am fine with being restricted to the same origin. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
