Skip to content
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

Selfhost static assets #106

Open
ghost opened this issue Jul 6, 2020 · 3 comments
Open

Selfhost static assets #106

ghost opened this issue Jul 6, 2020 · 3 comments
Labels
area: frontend Changes to front-end code complexity: easy Issues that should take limited effort to resolve/fix/build. priority: low type: analysis Potential changes that require some design/architecture/code analysis before we start implementing. type: change request New feature or request

Comments

@ghost
Copy link

ghost commented Jul 6, 2020

Is your feature request related to a problem? Please describe.
Currently qpixel makes many third party requests to various CDNs.

While using third party CDNs doesn't speed up the load time of static assets (especially when using http/2) it's also not exactly beneficial for user privacy.

Additionally qpixel doesn't use CSP for scripts hosted on third party domains which is a security issue.

Describe the solution you'd like
Selfhosting all the static assets that are currently loaded using third party CDNs would solve performance issues caused by third party CDNs and increase the the security of the web page (no more scripts loaded from third party domains).

Describe alternatives you've considered
Using SRI for script tags. However this wouldn't solve the privacy and performance issues.

@ArtOfCode-
Copy link
Member

It's a balance. On one hand, if we want to self-host everything, we have to put in the time to collect, host, and maintain with updates all the files we're hosting. On the other, we can load from a CDN, which comes with some minor security considerations, but removes the burden of maintenance.

CDNs can also speed up the load time of static assets, depending on what CDNs you use and how they work. Loading things from Cloudflare's CDN, for example, is going to be faster than self-hosting for anyone who's not in the US - our app server is in the US, but Cloudflare has datacenters around the world that can serve static assets from closer to end-users. The same may be true of other CDNs; self-hosting those assets may remove or alter that benefit.

@ghost
Copy link
Author

ghost commented Jul 7, 2020

I see.
Although it would be nice for qpixel to use SRI for scripts loaded from third party servers to at least mitigate the security issue.

On another note: have you considered loading all third party assets from the same CDN (e.g. load everything from jsdelivr or unpkg)? I could imagine that this would speed up the loading time of Qpixel.

@ArtOfCode- ArtOfCode- added area: frontend Changes to front-end code type: change request New feature or request priority: low complexity: easy Issues that should take limited effort to resolve/fix/build. type: analysis Potential changes that require some design/architecture/code analysis before we start implementing. labels Jan 16, 2023
@cellio
Copy link
Member

cellio commented Jul 24, 2023

@ArtOfCode- do we plan to do work here someday, or should we close this? (I can't tell from your comment and this is an old issue.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: frontend Changes to front-end code complexity: easy Issues that should take limited effort to resolve/fix/build. priority: low type: analysis Potential changes that require some design/architecture/code analysis before we start implementing. type: change request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants