3 ms·
Can you explain what the issue with this is? What does this circumvent that cannot be done with pure JS?
by dennisy 6y ago
Can you explain what the issue with this is? What does this circumvent that cannot be done with pure JS?
- capableweb 6y ago> Can you explain what the issue with this is? The only issue I can think of is mixing code/data with styling information. Otherwise there is no "issue" per se. > What does this circumvent that cannot be done with pure JS? Nothing, it is just JS after all, and the idea that you can store data in other things than JS variables is not new (jQuery days we stored data in various attributes in the DOM to keep track of state). You could also store the same data in <title/> tag and get the same results. Not sure what the use case is, except it's a fun little hack. Maybe this will spawn some new JS framework, nothing would surprise me anymore.
- rriepe 6y agoIf you're trying to make your code look non-malicious, it's easier if you have somewhere to hide the malicious-looking stuff.
- dillondoyle 6y agopossibly a longer lasting cache 'super cookie' i made a poc comment below. you could do something similar with a dynamically generated js file but i might wonder if a very small css file with headers like a cdn is cached longer