Could somebody suggest me a way for loading css or javascript file conditionally i.e only if url is accessible?
for example on my page I have the following files:
<html>
...
<link rel="stylesheet" type="text/css" href="https://service.test/css/a.css"/>
<script type="text/javascript" src="https://services.test/js/a.js"></script>
...
</html>
Is there any way to check if https://service.test/css/a.css
is accessible then if yes load this resource (same for https://services.test/js/a.js
)?