TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Css-only-chat: A truly monstrous async web chat using no JS on the front end

1010 点作者 bennylope大约 6 年前

26 条评论

fishtoaster大约 6 年前
Haha, I’m glad to see people enjoy this (author here)! If you like this sort of thing, some other terrible proof-of-concepts I’ve done:<p>A ruby dsl that’s indistinguishable from JavaScript. <a href="http:&#x2F;&#x2F;kevinkuchta.com&#x2F;_site&#x2F;2017&#x2F;07&#x2F;disguising-ruby-as-javascript&#x2F;" rel="nofollow">http:&#x2F;&#x2F;kevinkuchta.com&#x2F;_site&#x2F;2017&#x2F;07&#x2F;disguising-ruby-as-java...</a><p>^ and in talk form: <a href="http:&#x2F;&#x2F;confreaks.tv&#x2F;videos&#x2F;rubyconf2018-ruby-is-the-best-javascript" rel="nofollow">http:&#x2F;&#x2F;confreaks.tv&#x2F;videos&#x2F;rubyconf2018-ruby-is-the-best-jav...</a><p>A url-shortener using AWS lambda - JUST lambda. No data store. <a href="http:&#x2F;&#x2F;kevinkuchta.com&#x2F;_site&#x2F;2018&#x2F;03&#x2F;lambda-only-url-shortener&#x2F;" rel="nofollow">http:&#x2F;&#x2F;kevinkuchta.com&#x2F;_site&#x2F;2018&#x2F;03&#x2F;lambda-only-url-shorten...</a>
评论 #19853807 未加载
评论 #19856394 未加载
评论 #19855292 未加载
评论 #19853940 未加载
评论 #19853779 未加载
评论 #19857545 未加载
评论 #19859117 未加载
评论 #19858032 未加载
评论 #19860236 未加载
评论 #19859405 未加载
评论 #19853804 未加载
LeoPanthera大约 6 年前
The most interesting part of this at least for me is what inspired it: A way to track cursor location without using javascript, that even works in Tor Browser: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;davywtf&#x2F;status&#x2F;1124130932573839360" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;davywtf&#x2F;status&#x2F;1124130932573839360</a><p>tl;dr css hover selectors that change the background image don&#x27;t actually cause the browser to GET the specified background image until you hover over it, thus creating a way to send data from a web page with no javascript.
评论 #19852574 未加载
评论 #19852354 未加载
评论 #19852459 未加载
评论 #19853214 未加载
评论 #19857689 未加载
评论 #19853795 未加载
评论 #19852311 未加载
评论 #19853438 未加载
t0mbstone大约 6 年前
Now this is a proper hacker project perfect for being featured on this site
laszlokorte大约 6 年前
It seems all those css tracking tricks (a:visted, [value=...], now :hover) depend on external resouces (background-images) being loaded lazily only once the selector is matched. Wouldn&#x27;t a easy solution be for browsers to always download all url(&#x27;...&#x27;) references found the the stylesheets even if the selector is never matched?
评论 #19853437 未加载
评论 #19853620 未加载
评论 #19855220 未加载
评论 #19854373 未加载
RodgerTheGreat大约 6 年前
Seems like a compelling argument for not lazily loading urls referenced in CSS rules. If the browser progressively loaded everything in the stylesheet without user interaction it would presumably consume more bandwidth in many situations but it would also blast this server with a continuous stream of the entire alphabet.
_bxg1大约 6 年前
Reminds me of this:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;videlalvaro&#x2F;gifsockets" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;videlalvaro&#x2F;gifsockets</a>
评论 #19856814 未加载
flying_sheep大约 6 年前
Combining with Turing complete CSS, it can reach the sky higher than our imagination<p><a href="https:&#x2F;&#x2F;rawgit.com&#x2F;elitheeli&#x2F;stupid-machines&#x2F;master&#x2F;rule110-old&#x2F;rule110-full.html" rel="nofollow">https:&#x2F;&#x2F;rawgit.com&#x2F;elitheeli&#x2F;stupid-machines&#x2F;master&#x2F;rule110-...</a>
edjroot大约 6 年前
Just a few hours earlier, this discussion on Turing-complete stuff hit HN&#x27;s front page:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19847939" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19847939</a><p>Now I don&#x27;t know if there&#x27;s any causal relationship between the two (or the three) or if it&#x27;s just a big coincidence, since it says on the README that the inspiration for it came from a Tweet posted a few days ago.
zghst大约 6 年前
I am consistently surprised at the mass creativity with CSS over the years, never ever disappointed!
pmoriarty大约 6 年前
This makes me wonder: is CSS turing complete?<p>Are browsers that allow CSS as vulnerable to being exploited as those that allow Javascript?
评论 #19853092 未加载
评论 #19852422 未加载
评论 #19852815 未加载
评论 #19852410 未加载
CM30大约 6 年前
Probably a silly question, but is there a working demo for this? This is one of those things you kinda have to see in action, and there doesn&#x27;t seem to be a link to anything like that in the readme.
thesandlord大约 6 年前
Reminds me of this: <a href="https:&#x2F;&#x2F;harmless.herokuapp.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;harmless.herokuapp.com&#x2F;</a><p>HN Discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16319248" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16319248</a><p>Basically the same idea, but it does refresh when you submit. The CSS buttons are quite a clever workaround to not refresh the page.
评论 #19853453 未加载
woah大约 6 年前
You could do this with no CSS, only html.
评论 #19855318 未加载
评论 #19853272 未加载
评论 #19854121 未加载
评论 #19852923 未加载
评论 #19853119 未加载
shoes_for_thee大约 6 年前
&gt; Should I use this in real life? Dear god yes.
QuinnWilton大约 6 年前
You could write a UI framework using these ideas to provide rich client-sided functionality to Tor hidden services, where users typically disable JavaScript.
st0p大约 6 年前
I&#x27;ve gotta admit: hats off for this clever hack.
sevsco大约 6 年前
Rather than the forever loading site, couldn&#x27;t you also include in the html doc something like this to have it simply refresh every few seconds?<p>&lt;meta http-equiv=&quot;refresh&quot; content=&quot;10; URL=&#x27;<a href="http:&#x2F;&#x2F;new-website.com&#x27;&quot;" rel="nofollow">http:&#x2F;&#x2F;new-website.com&#x27;&quot;</a> &#x2F;&gt;<p>So the page would simply refresh itself every 10 seconds.
Endy大约 6 年前
You know, projects like this make me want to start blocking *.css files in my HOSTS file and browser setups.
评论 #19856262 未加载
leshokunin大约 6 年前
Definitely the most creative code I&#x27;ll be seeing this week! I realize this is really bad practice and likely to be fixed since it can be used for tracking users, but: are there any advantages to using CSS over Javascript, in theory?
评论 #19853509 未加载
评论 #19852920 未加载
westmeal大约 6 年前
I don&#x27;t know why you did what you did but I am glad you did.
mishingo大约 6 年前
You lost me at ruby
chethiya44大约 6 年前
gf
gok2大约 6 年前
link?
caprese大约 6 年前
When the A&#x2F;B test tells you that you should<p>but you shouldn&#x27;t
keyle大约 6 年前
This is what hacking is all about!
petercooper大约 6 年前
&quot;Css-only-chat&quot;<p>CSS is always CSS. It&#x27;s CSS on the repo too, but got edited back to &quot;Css&quot; here on the HN title for some reason.