How to fix net::ERR_NAME_NOT_RESOLVED in ajax GET?

文章推薦指數: 80 %
投票人數:10人

Whenever I use this though, I get an error: net::ERR_NAME_NOT_RESOLVED. I was wondering how would I fix this for the long term? Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. Learnmore Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. Learnmore Howtofixnet::ERR_NAME_NOT_RESOLVEDinajaxGET? AskQuestion Asked 3monthsago Modified 3monthsago Viewed 156times 0 IhaveasimpleJSprogramthatworkswithJQueryAjaxtopingawebsiteandreturnthestatuscode: $.get("https://dev.tylernodes.com",function(data){ console.log(data); }).done(function(){ //TODOONDONE }).fail(function(data,textStatus,xhr){ //Thisshowsstatuscodeeg.403 console.log("error",data.status); //Thisshowsstatusmessageeg.Forbidden console.log("STATUS:"+xhr); }).always(function(){ //TO-DOafterfail/donerequest. console.log("ended"); }); WheneverIusethisthough,Igetanerror:net::ERR_NAME_NOT_RESOLVED IwaswonderinghowwouldIfixthisforthelongterm? javascriptjqueryajaxhttps Share Improvethisquestion Follow askedApr25at17:04 MountMarioMountMario 4555bronzebadges 4 Whydoyouexpectdev.tylernodes.comtoresolve? – Quentin Apr25at17:08 thatsmywebsite... – MountMario Apr25at17:13 Well,itdoesn'texisthere:Hostdev.tylernodes.comnotfound:3(NXDOMAIN).Whydoyouexpectittoexistforyou? – Quentin Apr25at17:32 Also,beawarethatyouruseofPINGhereisamisnomer.You'remakinganHTTPRequest.MyunderstandingisthatthereisnowaytodoatruePINGwithJS/AJAX – fnostro Apr25at17:57 Addacomment  |  0 Sortedby: Resettodefault Highestscore(default) Trending(recentvotescountmore) Datemodified(newestfirst) Datecreated(oldestfirst) Knowsomeonewhocananswer?Sharealinktothisquestionviaemail,Twitter,orFacebook. YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Browseotherquestionstaggedjavascriptjqueryajaxhttpsoraskyourownquestion. TheOverflowBlog Measurableandmeaningfulskilllevelsfordevelopers SanFrancisco?MorelikeSanFrancis-go(Ep.468) FeaturedonMeta AnnouncingtheStacksEditorBetarelease! The[shopping]and[shop]tagsarebeingburninated Related 7623 HowdoJavaScriptclosureswork? 3091 HowcanIuploadfilesasynchronouslywithjQuery? 8416 HowdoIcheckifanelementishiddeninjQuery? 4560 HowdoyougetatimestampinJavaScript? 1945 AbortAjaxrequestsusingjQuery 7707 HowdoIredirecttoanotherwebpage? 5029 HowdoIcheckwhetheracheckboxischeckedinjQuery? 7414 HowtocheckwhetherastringcontainsasubstringinJavaScript? 10803 HowcanIremoveaspecificitemfromanarray? 6401 HowdoIreturntheresponsefromanasynchronouscall? HotNetworkQuestions WherecanIfindwhatcontrolsthebehaviorofCtrl+Alt+Backspace? WhywasMaxVerstappennotrequiredtostartonhisQ2tyresintheHungaryGP? RegisteringacarintheEUasanon-residentcitizen Addpercentageintherightsideofthehistogramwithlegend CanIgetaclocksignalfroma4-pincrystaloscillatorcircuitbyapplying5Vtotheinputpin? howtorefillthetoiletafterthewaterhasevaporatedfromdisuse? Whyaremagneticfieldlinesimaginary? Howtoavoidstalemateintheposition? Mysiliconemoldgotmoldy,canIcleanitorshouldIthrowitaway? What'sareasonableenvironmentaldisasterthatcouldbecausedbyaprobefromEarthenteringEuropa'socean? Whydoes"cp"complainaboutidenticalfileswhenchainingwith"find"? Whatdoesanarearepresentinaspacetimediagram? CommodoreSX-64Whitescreen WhatwasthepurposeofthosespecialuseraccountsinUnix? Whatis"RosencrantzandGuildenstern"in_TheMarvelousMrs.Maisel_season3episode5? DrawrandomgeometricgraphwithTikZ(connectcloserandomnodes) HowcanIshufflecolumnsbyeveryanotherinR? DotheHuicholofMexicotieropearoundthefather'stesticlesduringbirth? Whyisthereawhitepanelinastronaut’sfabricheadcovertheywearinsidethehardhelmet? CanaUScitizenwho'sneverlivedinUSvoteinUS? Howtocleanupmarginsofawet-on-wetoilpainting? HowCanCookedMeatHaveProteinValue? Isthereanameforthisfallacywhensomeonesayssomethingisgoodbyonlypointingoutthegoodthings? WhichbookshouldIchoosetogetintotheLispWorld? morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. lang-js Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings  



請為這篇文章評分?