In JavaScript, is there a way to get source code of a page given its URL? Kind of equivalent to PHP\'s file_get_contents()
You can just download from a URL through XMLHttpRequest (or jQuery's ajax):
ajax
$.get( 'yourfile.js', function(data) { // The source code is in data } );