recently, the company asked to write a sliding CAPTCHA of Aliyun to verify the function of SMS. But when slide.js uses online resources
< script type= "text/javascript" charset= "utf-8" src= " https://g.alicdn.com/sd/ncpc/.; > when < / script >
is called to create slider verification, some written objects are not defined because the local js call is relatively fast. Because the online js has not yet been loaded, the slider for sliding verification cannot come out. After downloading the online resources, I give priority to executing slide.js
< script type= "text/javascript" src= "js/slide.js" > < / script >
slide.js, which is the downloaded code, put it locally, and then can be loaded out of the slider. But I don"t know whether it is better to load slide.js with outer chain or put it locally after putting the whole project online. For example, is it better to use jq to refer to it outside the chain, or in the local reference of the server? when referencing locally, the client should also request a link from the server. If it is an external chain resource, the client not only requests something from the server, but also requests something from another server.
so is it better to download the externally linked resources on the web side to the local side, or to use the linked resources on the web page? Ask for answers, online, etc.