Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does someone know if there is a way to provide an alternate source for a script in case of failure of the main source ?


you could probably include the script multiple times from different places, so long as you're not doing something within it as it loads (i.e. it's just functions)

I don't know enough about JS to say, but you might be able to do if(!$loadedvar){document.whatever.write("<script src=\"...\" />"); }; as well




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: