r/shittyprogramming • • Jan 16 '20

JavaScript: it's a security risk

Overheard on a call one of my colleagues just got off of:

Colleague: "So why aren't you able to add our JavaScript to your checkout page?"

Client: "Oh, we disable JavaScript on our entire checkout page."

Colleague: "...why?"

Client: "It's a security risk."

Colleague: <head explodes>

136 Upvotes

72 comments sorted by

View all comments

Show parent comment

1

u/forsakenharmony Jan 17 '20

imo you should try to avoid 3rd party javascript in general on your page, especially if it's relevant for functionality

If your page doesn't work without, you're doing something wrong, public cdns are dead

Also really don't understand sites that have multiple domains they own themselves (see github, among others: github, githubusercontent,... )

1

u/Joniator Jan 17 '20

public cdns are dead

Can you elaborate? I think I read somewhere that new browser features like cache seperation may impact this, but couldn't find a source for that.

And, if I'm not mistaken, in the end they still are a reliable/cheap way to integrate libraries, they just don't differ from hosting it yourself because they get cached with your site, not globally