Don't use third party CSS

Created on 22 October 2023, about 1 year ago

Problem/Motivation

To respect user privacy, it's best to not use third-parties.

CDN / externally hosted libraries

You might want to use JavaScript that is externally on a CDN (Content Delivery Network) — e.g. web fonts are usually only available using an external URL. This can be done by declaring the library to be external (by specifying type: external). It is also a good idea to include some information about the external library in the definition.

Note that it is in general not a good idea to load libraries from a CDN; avoid this if possible. It introduces more points of failure both performance- and security-wise, requires more TCP/IP connections to be set up, and usually is not in the browser cache anyway. However, 3rd party libraries should not be hosted on Drupal.org as part of your repo – see Policy on 3rd party libraries on Drupal.org for clarification of policy.

[...]

From https://www.drupal.org/docs/develop/creating-modules/adding-assets-css-j...

Steps to reproduce

Use uBlock Origin in Firefox and see that a CSS file https://stackpath.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css is requested:

Proposed resolution

Remove the reliance, and add necessary CSS directly in the module.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇩🇰Denmark ressa Copenhagen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024