\n\n```\n\nI would prefer to not subject people viewing my page to any external tracking if I can avoid it. My page has zero tracking/analytics for this reason. I briefly tried downloading LightBox2 and directly including it instead, and was able to get it working *mostly*, but some things were broken that I would need to debug. Before I do that I was wondering, is this even a problem? Is including stuff from cloudflare cdn like this sketchy? It's possible I'm being overly paranoid but I have no idea.","creator_id":402965,"community_id":5,"removed":false,"locked":false,"published":"2025-04-24T00:49:57.219157","updated":"2025-04-24T01:33:44.145360","deleted":false,"nsfw":false,"embed_title":null,"embed_description":null,"embed_video_url":null,"thumbnail_url":null,"ap_id":"https://lemmy.ml/post/29069314","local":false,"language_id":37,"featured_community":false,"featured_local":false},"creator":{"id":402965,"name":"MoonMelon","display_name":null,"avatar":null,"banned":false,"published":"2023-12-23T17:10:10.465492","updated":null,"actor_id":"https://lemmy.ml/u/MoonMelon","bio":null,"local":false,"banner":null,"deleted":false,"inbox_url":"https://lemmy.ml/u/MoonMelon/inbox","shared_inbox_url":"https://lemmy.ml/inbox","matrix_user_id":null,"admin":false,"bot_account":false,"ban_expires":null,"instance_id":3},"community":{"id":5,"name":"privacy","title":"Privacy","description":"# A place to discuss privacy and freedom in the digital world.\n\nPrivacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy. \n\nIn this community everyone is welcome to post links and discuss topics related to privacy.\n\n### Some Rules\n\n - Posting a link to a website containing tracking isn't great, if contents of the website are behind a paywall maybe copy them into the post\n - Don't promote proprietary software\n - Try to keep things on topic\n - If you have a question, please try searching for previous discussions, maybe it has already been answered\n - Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience\n - Be nice :)\n\n### Related communities\n\n- [Lemmy.ml libre_culture](https://lemmy.ml/c/libre_culture)\n- [Lemmy.ml privatelife](https://lemmy.ml/c/privatelife)\n- [Lemmy.ml DeGoogle](https://lemmy.ml/c/degoogle)\n- [Lemmy.ca privacy](https://lemmy.ca/c/privacy)\n\nmuch thanks to @gary_host_laptop for the logo design :)","removed":false,"published":"2019-11-15T23:50:53.712299","updated":"2024-11-22T21:30:19.947538","deleted":false,"nsfw":false,"actor_id":"https://lemmy.ml/c/privacy","local":false,"icon":"https://lemmy.ml/pictrs/image/h1ChnLuBHr.png","banner":"https://lemmy.ml/pictrs/image/DBjcqOW9ds.png","hidden":false,"posting_restricted_to_mods":false,"instance_id":3},"creator_banned_from_community":false,"counts":{"id":29212,"post_id":70346,"comments":19,"score":15,"upvotes":15,"downvotes":0,"published":"2025-04-24T00:49:57.219157","newest_comment_time_necro":"2025-04-24T18:42:34.328331","newest_comment_time":"2025-04-24T18:42:34.328331","featured_community":false,"featured_local":false},"subscribed":"NotSubscribed","saved":false,"read":false,"creator_blocked":false,"my_vote":null,"unread_comments":19},"community_view":{"community":{"id":5,"name":"privacy","title":"Privacy","description":"# A place to discuss privacy and freedom in the digital world.\n\nPrivacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy. \n\nIn this community everyone is welcome to post links and discuss topics related to privacy.\n\n### Some Rules\n\n - Posting a link to a website containing tracking isn't great, if contents of the website are behind a paywall maybe copy them into the post\n - Don't promote proprietary software\n - Try to keep things on topic\n - If you have a question, please try searching for previous discussions, maybe it has already been answered\n - Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience\n - Be nice :)\n\n### Related communities\n\n- [Lemmy.ml libre_culture](https://lemmy.ml/c/libre_culture)\n- [Lemmy.ml privatelife](https://lemmy.ml/c/privatelife)\n- [Lemmy.ml DeGoogle](https://lemmy.ml/c/degoogle)\n- [Lemmy.ca privacy](https://lemmy.ca/c/privacy)\n\nmuch thanks to @gary_host_laptop for the logo design :)","removed":false,"published":"2019-11-15T23:50:53.712299","updated":"2024-11-22T21:30:19.947538","deleted":false,"nsfw":false,"actor_id":"https://lemmy.ml/c/privacy","local":false,"icon":"https://lemmy.ml/pictrs/image/h1ChnLuBHr.png","banner":"https://lemmy.ml/pictrs/image/DBjcqOW9ds.png","hidden":false,"posting_restricted_to_mods":false,"instance_id":3},"subscribed":"NotSubscribed","blocked":false,"counts":{"id":4,"community_id":5,"subscribers":1,"posts":3892,"comments":98210,"published":"2019-11-15T23:50:53.712299","users_active_day":124,"users_active_week":1052,"users_active_month":1302,"users_active_half_year":4577}},"moderators":[{"community":{"id":5,"name":"privacy","title":"Privacy","description":"# A place to discuss privacy and freedom in the digital world.\n\nPrivacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy. \n\nIn this community everyone is welcome to post links and discuss topics related to privacy.\n\n### Some Rules\n\n - Posting a link to a website containing tracking isn't great, if contents of the website are behind a paywall maybe copy them into the post\n - Don't promote proprietary software\n - Try to keep things on topic\n - If you have a question, please try searching for previous discussions, maybe it has already been answered\n - Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience\n - Be nice :)\n\n### Related communities\n\n- [Lemmy.ml libre_culture](https://lemmy.ml/c/libre_culture)\n- [Lemmy.ml privatelife](https://lemmy.ml/c/privatelife)\n- [Lemmy.ml DeGoogle](https://lemmy.ml/c/degoogle)\n- [Lemmy.ca privacy](https://lemmy.ca/c/privacy)\n\nmuch thanks to @gary_host_laptop for the logo design :)","removed":false,"published":"2019-11-15T23:50:53.712299","updated":"2024-11-22T21:30:19.947538","deleted":false,"nsfw":false,"actor_id":"https://lemmy.ml/c/privacy","local":false,"icon":"https://lemmy.ml/pictrs/image/h1ChnLuBHr.png","banner":"https://lemmy.ml/pictrs/image/DBjcqOW9ds.png","hidden":false,"posting_restricted_to_mods":false,"instance_id":3},"moderator":{"id":42,"name":"k_o_t","display_name":null,"avatar":"https://lemmy.ml/pictrs/image/992c7275-dd2a-4fa3-aace-6819e72995fb.png","banned":false,"published":"2019-12-29T11:51:05.628232","updated":"2022-01-13T15:18:29.470615","actor_id":"https://lemmy.ml/u/k_o_t","bio":null,"local":false,"banner":null,"deleted":false,"inbox_url":"https://lemmy.ml/u/k_o_t/inbox","shared_inbox_url":"https://lemmy.ml/inbox","matrix_user_id":"@brokoli:matrix.org","admin":false,"bot_account":false,"ban_expires":null,"instance_id":3}},{"community":{"id":5,"name":"privacy","title":"Privacy","description":"# A place to discuss privacy and freedom in the digital world.\n\nPrivacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy. \n\nIn this community everyone is welcome to post links and discuss topics related to privacy.\n\n### Some Rules\n\n - Posting a link to a website containing tracking isn't great, if contents of the website are behind a paywall maybe copy them into the post\n - Don't promote proprietary software\n - Try to keep things on topic\n - If you have a question, please try searching for previous discussions, maybe it has already been answered\n - Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience\n - Be nice :)\n\n### Related communities\n\n- [Lemmy.ml libre_culture](https://lemmy.ml/c/libre_culture)\n- [Lemmy.ml privatelife](https://lemmy.ml/c/privatelife)\n- [Lemmy.ml DeGoogle](https://lemmy.ml/c/degoogle)\n- [Lemmy.ca privacy](https://lemmy.ca/c/privacy)\n\nmuch thanks to @gary_host_laptop for the logo design :)","removed":false,"published":"2019-11-15T23:50:53.712299","updated":"2024-11-22T21:30:19.947538","deleted":false,"nsfw":false,"actor_id":"https://lemmy.ml/c/privacy","local":false,"icon":"https://lemmy.ml/pictrs/image/h1ChnLuBHr.png","banner":"https://lemmy.ml/pictrs/image/DBjcqOW9ds.png","hidden":false,"posting_restricted_to_mods":false,"instance_id":3},"moderator":{"id":43,"name":"tmpod","display_name":"tmpod","avatar":"https://lemmy.pt/pictrs/image/gIPQUt3mxw.png","banned":false,"published":"2021-09-10T19:37:20.367073","updated":"2022-08-04T16:23:06.747838","actor_id":"https://lemmy.pt/u/tmpod","bio":"Estudante de Engenharia Informática apaixonado pela área; algures em Portugal.\n\nAdministrador da instância lemmy.pt.\n\n---\n\nComputer Science student, passionate about the field; somewhere in Portugal.\n\nlemmy.pt instance administrator.\n\n---\n\nhttps://tmpod.dev","local":false,"banner":"https://lemmy.pt/pictrs/image/iLIlqIIuaW.jpg","deleted":false,"inbox_url":"https://lemmy.pt/u/tmpod/inbox","shared_inbox_url":"https://lemmy.pt/inbox","matrix_user_id":"@tmpod:matrix.org","admin":false,"bot_account":false,"ban_expires":null,"instance_id":37}},{"community":{"id":5,"name":"privacy","title":"Privacy","description":"# A place to discuss privacy and freedom in the digital world.\n\nPrivacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy. \n\nIn this community everyone is welcome to post links and discuss topics related to privacy.\n\n### Some Rules\n\n - Posting a link to a website containing tracking isn't great, if contents of the website are behind a paywall maybe copy them into the post\n - Don't promote proprietary software\n - Try to keep things on topic\n - If you have a question, please try searching for previous discussions, maybe it has already been answered\n - Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience\n - Be nice :)\n\n### Related communities\n\n- [Lemmy.ml libre_culture](https://lemmy.ml/c/libre_culture)\n- [Lemmy.ml privatelife](https://lemmy.ml/c/privatelife)\n- [Lemmy.ml DeGoogle](https://lemmy.ml/c/degoogle)\n- [Lemmy.ca privacy](https://lemmy.ca/c/privacy)\n\nmuch thanks to @gary_host_laptop for the logo design :)","removed":false,"published":"2019-11-15T23:50:53.712299","updated":"2024-11-22T21:30:19.947538","deleted":false,"nsfw":false,"actor_id":"https://lemmy.ml/c/privacy","local":false,"icon":"https://lemmy.ml/pictrs/image/h1ChnLuBHr.png","banner":"https://lemmy.ml/pictrs/image/DBjcqOW9ds.png","hidden":false,"posting_restricted_to_mods":false,"instance_id":3},"moderator":{"id":44,"name":"Yayannick","display_name":null,"avatar":"https://lemmy.ml/pictrs/image/99671f4f-dc19-437d-9f91-18a17e3e07ef.png","banned":false,"published":"2021-12-10T08:12:33.393328","updated":"2023-01-27T14:20:11.869598","actor_id":"https://lemmy.ml/u/Yayannick","bio":"The last man on Earth hears a knock on the door.","local":false,"banner":null,"deleted":false,"inbox_url":"https://lemmy.ml/u/Yayannick/inbox","shared_inbox_url":"https://lemmy.ml/inbox","matrix_user_id":null,"admin":false,"bot_account":false,"ban_expires":null,"instance_id":3}},{"community":{"id":5,"name":"privacy","title":"Privacy","description":"# A place to discuss privacy and freedom in the digital world.\n\nPrivacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy. \n\nIn this community everyone is welcome to post links and discuss topics related to privacy.\n\n### Some Rules\n\n - Posting a link to a website containing tracking isn't great, if contents of the website are behind a paywall maybe copy them into the post\n - Don't promote proprietary software\n - Try to keep things on topic\n - If you have a question, please try searching for previous discussions, maybe it has already been answered\n - Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience\n - Be nice :)\n\n### Related communities\n\n- [Lemmy.ml libre_culture](https://lemmy.ml/c/libre_culture)\n- [Lemmy.ml privatelife](https://lemmy.ml/c/privatelife)\n- [Lemmy.ml DeGoogle](https://lemmy.ml/c/degoogle)\n- [Lemmy.ca privacy](https://lemmy.ca/c/privacy)\n\nmuch thanks to @gary_host_laptop for the logo design :)","removed":false,"published":"2019-11-15T23:50:53.712299","updated":"2024-11-22T21:30:19.947538","deleted":false,"nsfw":false,"actor_id":"https://lemmy.ml/c/privacy","local":false,"icon":"https://lemmy.ml/pictrs/image/h1ChnLuBHr.png","banner":"https://lemmy.ml/pictrs/image/DBjcqOW9ds.png","hidden":false,"posting_restricted_to_mods":false,"instance_id":3},"moderator":{"id":20732,"name":"ranok","display_name":null,"avatar":null,"banned":false,"published":"2023-06-01T12:58:56.504051","updated":null,"actor_id":"https://sopuli.xyz/u/ranok","bio":null,"local":false,"banner":null,"deleted":false,"inbox_url":"https://sopuli.xyz/u/ranok/inbox","shared_inbox_url":"https://sopuli.xyz/inbox","matrix_user_id":null,"admin":false,"bot_account":false,"ban_expires":null,"instance_id":53}}],"online":0},{"comments":[{"comment":{"id":531297,"creator_id":529074,"post_id":70346,"content":"I don't trust cloudflare. That is just a JS CDN that pulls a file, but is still gathered from an external server. In my case, when I have to use CDNs to use a JS library, I just download the file and host it locally.\n\nYou don't own the CDN, is controlled by other people, which means that of course is less private to the end user, and more insecure since you rely on the people running the CDN and the author or the library. What would happen if the library author/authors get hacked and they add malicious code to the library? (Asumming it doesn't contain a `integrity` attribute like the one on your example).\n\nIs better to trust yourself, it doesn't cost you anything to download a few kB of a JS file and serve it directly from your server. The page is not going to load 2s faster if you use a JS CDN\n\nAnd no one wants this to occur to their websites: https://fossa.com/blog/polyfill-supply-chain-attack-details-fixes/","removed":false,"published":"2025-04-24T18:42:34.328331","updated":null,"deleted":false,"ap_id":"https://programming.dev/comment/16515963","local":false,"path":"0.531297","distinguished":false,"language_id":0},"creator":{"id":529074,"name":"Fijxu","display_name":null,"avatar":"https://programming.dev/pictrs/image/2eb42b89-8e7a-4310-86bd-402aa64092d0.webm","banned":false,"published":"2023-09-14T18:41:59.367272","updated":null,"actor_id":"https://programming.dev/u/Fijxu","bio":null,"local":false,"banner":"https://programming.dev/pictrs/image/c5889913-505a-45d4-b943-b459e1f2f586.jpeg","deleted":false,"inbox_url":"https://programming.dev/u/Fijxu/inbox","shared_inbox_url":"https://programming.dev/inbox","matrix_user_id":null,"admin":false,"bot_account":false,"ban_expires":null,"instance_id":25693},"post":{"id":70346,"name":"Does using Cloudflare's cdnjs compromise privacy?","url":null,"body":"Prefacing by saying I'm a total noob to webdev.\n\nI'm trying to move my personal portfolio site off of Squarespace and onto some sort of static hosting. Since I know nothing, I'm cobbling together hugo templates and using [LightBox2 ](https://lokeshdhakar.com/projects/lightbox2/) to show image galleries. The blog I'm referencing includes LightBox2 using this:\n\n```\n\n\n```\n\nI would prefer to not subject people viewing my page to any external tracking if I can avoid it. My page has zero tracking/analytics for this reason. I briefly tried downloading LightBox2 and directly including it instead, and was able to get it working *mostly*, but some things were broken that I would need to debug. Before I do that I was wondering, is this even a problem? Is including stuff from cloudflare cdn like this sketchy? It's possible I'm being overly paranoid but I have no idea.","creator_id":402965,"community_id":5,"removed":false,"locked":false,"published":"2025-04-24T00:49:57.219157","updated":"2025-04-24T01:33:44.145360","deleted":false,"nsfw":false,"embed_title":null,"embed_description":null,"embed_video_url":null,"thumbnail_url":null,"ap_id":"https://lemmy.ml/post/29069314","local":false,"language_id":37,"featured_community":false,"featured_local":false},"community":{"id":5,"name":"privacy","title":"Privacy","description":"# A place to discuss privacy and freedom in the digital world.\n\nPrivacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy. \n\nIn this community everyone is welcome to post links and discuss topics related to privacy.\n\n### Some Rules\n\n - Posting a link to a website containing tracking isn't great, if contents of the website are behind a paywall maybe copy them into the post\n - Don't promote proprietary software\n - Try to keep things on topic\n - If you have a question, please try searching for previous discussions, maybe it has already been answered\n - Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience\n - Be nice :)\n\n### Related communities\n\n- [Lemmy.ml libre_culture](https://lemmy.ml/c/libre_culture)\n- [Lemmy.ml privatelife](https://lemmy.ml/c/privatelife)\n- [Lemmy.ml DeGoogle](https://lemmy.ml/c/degoogle)\n- [Lemmy.ca privacy](https://lemmy.ca/c/privacy)\n\nmuch thanks to @gary_host_laptop for the logo design :)","removed":false,"published":"2019-11-15T23:50:53.712299","updated":"2024-11-22T21:30:19.947538","deleted":false,"nsfw":false,"actor_id":"https://lemmy.ml/c/privacy","local":false,"icon":"https://lemmy.ml/pictrs/image/h1ChnLuBHr.png","banner":"https://lemmy.ml/pictrs/image/DBjcqOW9ds.png","hidden":false,"posting_restricted_to_mods":false,"instance_id":3},"counts":{"id":465619,"comment_id":531297,"score":3,"upvotes":3,"downvotes":0,"published":"2025-04-24T18:42:34.328331","child_count":0},"creator_banned_from_community":false,"subscribed":"NotSubscribed","saved":false,"creator_blocked":false,"my_vote":null}]}]} Does using Cloudflare's cdnjs compromise privacy? - Toot!

Prefacing by saying I’m a total noob to webdev.

I’m trying to move my personal portfolio site off of Squarespace and onto some sort of static hosting. Since I know nothing, I’m cobbling together hugo templates and using LightBox2 to show image galleries. The blog I’m referencing includes LightBox2 using this:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.1/js/lightbox.min.js" integrity="sha256-CtKylYan+AJuoH8jrMht1+1PMhMqrKnB8K5g012WN5I=" crossorigin="anonymous"></script>

I would prefer to not subject people viewing my page to any external tracking if I can avoid it. My page has zero tracking/analytics for this reason. I briefly tried downloading LightBox2 and directly including it instead, and was able to get it working mostly, but some things were broken that I would need to debug. Before I do that I was wondering, is this even a problem? Is including stuff from cloudflare cdn like this sketchy? It’s possible I’m being overly paranoid but I have no idea.

I don’t trust cloudflare. That is just a JS CDN that pulls a file, but is still gathered from an external server. In my case, when I have to use CDNs to use a JS library, I just download the file and host it locally.

You don’t own the CDN, is controlled by other people, which means that of course is less private to the end user, and more insecure since you rely on the people running the CDN and the author or the library. What would happen if the library author/authors get hacked and they add malicious code to the library? (Asumming it doesn’t contain a integrity attribute like the one on your example).

Is better to trust yourself, it doesn’t cost you anything to download a few kB of a JS file and serve it directly from your server. The page is not going to load 2s faster if you use a JS CDN

And no one wants this to occur to their websites: https://fossa.com/blog/polyfill-supply-chain-attack-details-fixes/

Create a post

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

  • Posting a link to a website containing tracking isn’t great, if contents of the website are behind a paywall maybe copy them into the post
  • Don’t promote proprietary software
  • Try to keep things on topic
  • If you have a question, please try searching for previous discussions, maybe it has already been answered
  • Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience
  • Be nice :)

Related communities

much thanks to @gary_host_laptop for the logo design :)

  • 0 users online
  • 124 users / day
  • 1.05K users / week
  • 1.3K users / month
  • 4.58K users / 6 months
  • 1 subscriber
  • 3.89K Posts
  • 98.2K Comments
  • Modlog