Skip to content
This repository was archived by the owner on Apr 2, 2020. It is now read-only.
This repository was archived by the owner on Apr 2, 2020. It is now read-only.

Can a local file be used as a fallback? FR #77

@jgstew

Description

@jgstew
  • Can a local file be used as a fallback if the CDN location fails?
  • Can a CDN location be used as a fallback if the local file is missing?

My use case is that I want to load the js & css from a CDN in almost all cases, except that some deployments will have all CDNs blocked and will need to fall back to local files. To simplify development, testing, and deployment, I'd rather not have local copies of the JS & CSS because they won't be necessary the majority of the time, but it would be nice to provide an easy solution for the rare cases that will need a local copy.

I don't see this option in any examples or documentation. I haven't tried it yet, but I am planning on trying a local relative file path as a URL to see if that works or not.

If this is not currently possible, I'd like to see it added as a possibility. ( Feature Request )

This seems to be one of the best options to do what I need with native functionality:

From: http://stackoverflow.com/a/5531821/861745

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.5.1.min.js">\x3C/script>')</script>

This will probably work for me, but I really liked the idea of using fallback instead with the option for multiple CDNs and other niceties.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions