great example of a code smell, too!
JS needs to know about styles?
shouldn’t be styling in JS! make it asd/remove a class instead
need to know whether to load content or not? save it to local/session storage! don’t make a server call if it already exists!
need to enhance your tracking? include it with your payloads as it happens, you’re asking for race conditions
client side disabled local caching? great! working as intended. make a graceful fall-back
everything here is a short term problem that belies long term tech debt. tight coupling sounds sexy, but SOLID principals and The Law of Demeter exist to stop our codebases from rotting
if we can’t change it, then it’s not software it’s hardware
It’s about JS trying to detect if the link was visited, not about style. People used to do that to evade cross-site tracking protection, and this is why JS isn’t allowed to know that anymore.
great example of a code smell, too! JS needs to know about styles?
shouldn’t be styling in JS! make it asd/remove a class instead
need to know whether to load content or not? save it to local/session storage! don’t make a server call if it already exists!
need to enhance your tracking? include it with your payloads as it happens, you’re asking for race conditions
client side disabled local caching? great! working as intended. make a graceful fall-back
everything here is a short term problem that belies long term tech debt. tight coupling sounds sexy, but SOLID principals and The Law of Demeter exist to stop our codebases from rotting if we can’t change it, then it’s not software it’s hardware
It’s about JS trying to detect if the link was visited, not about style. People used to do that to evade cross-site tracking protection, and this is why JS isn’t allowed to know that anymore.
This. Did a seminar on these techniques during my it security degree. Porn sites invented that to detect people that use competing sites.
hence the comment about tracking ;) anything more than recording your events as they happen are a security and privacy risk
But what if I want to use JSSS?