Skip to content

use jQuery CDN #1026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

peterbecich
Copy link
Member

@peterbecich peterbecich commented Feb 27, 2022

The version of jQuery is unchanged, 1.12.4. The CDN (content delivery network) was found here: https://developers.google.com/speed/libraries#jquery

The version of jQuery is unchanged, 1.12.4. The CDN was found here: https://developers.google.com/speed/libraries#jquery
@peterbecich peterbecich mentioned this pull request Feb 27, 2022
@ysangkok
Copy link
Member

What is the advantage of using an additional CDN? Hackage is already served from a CDN. With this change, users that use script blocking extensions like uMatrix would need to allow an additional domain.

@peterbecich
Copy link
Member Author

I hadn't thought of that, but fonts.googleapis.com and jsdelivr.net are already used:

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"/>

<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet">

googleFontURL = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"

<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>

The only two reasons I can think of to merge this PR are:

  • reuse jQuery 1.12.4 pre-cached by visiting other websites
  • delete lines of code from this repository

@nickburlett
Copy link
Contributor

If you do this, please make it configurable... Having it use a CDN will prevent a hackage mirror from working in an air-gapped system.

@gbaz
Copy link
Contributor

gbaz commented Mar 24, 2022

I think if the fonts or mathjax fails that just screws up rendering. We might actually use the jquery functionality for something important to user experience.

@peterbecich
Copy link
Member Author

Closing; I could not make this work with a fallback option.

@peterbecich peterbecich deleted the use-jquery-cdn branch March 25, 2022 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants