hellopearlcare / feedback

1 stars 0 forks source link

Lack of CDN fallback #12

Open DylanTackoor opened 7 years ago

DylanTackoor commented 7 years ago

You can click on the Preview tab above to see how your request will look like once you submit this new issue.

Please mark with an x the box that best describes your request:

If you want to propose an enhancement or have a new-feature request, please provide us with a detailed description of the enhancement or the request below:

We currently are loading some scripts, such as Bootstrap, via a CDN as below:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

If for whatever reason this CDN goes down our front end is screwed. One tested solution to this is to check if a method exists and load a local backup if it doesn't.

<script>$.fn.modal || document.write('<script src="/assets/js/lib/bootstrap.min.js">\x3C/script>')</script>

Is there anything else you would like us to know?

While I know the above works, I don't recall where exactly the line is written to in the DOM.

pearlbot commented 7 years ago

Yes! We can further discuss an implementation in our huddle.

DylanTackoor commented 7 years ago

Two URLs with more information with the first confirming my above suggestion as valid, the second providing an alternative. Will research which method is best pending huddle.