News for hackers. Stuff that matters.
Re:Finally, voting without refresh by pg on Tuesday June 12, 2007 @03:02PM (#27552)
Don't worry, I'm not going to post a link about each releaselet. I just wanted to thank PB for helping us.
Re:Finally, voting without refresh by ralph on Friday June 15, 2007 @08:20AM (#28315)
I looked into how it worked and found other things out.

Every page refers to /news.css. Since few HTTP headers are returned with /news.css, no caching is performed AFAICS anywhere between my browser and news.yc. So every page access makes the browser request /news.css again, doubling the number of hits.

Any unknown URL returns a HTTP 200 OK instead of, e.g. a 404, e.g. http://news.ycombinator.com/standards_what_standards . This is seen by my browser when it requests a /favicon.ico. It tries twice, presumably because it isn't keen on the HTML response. That's twice per page access to news.yc. It can't learn there's no favicon because it gets a 200 back rather than a 404.

Sorting this out would just seem nice. Pretty trivial too, I'd have thought. At the moment every dynamic page access to view a thread is generating an extra three needless HTTP requests.

Re:Finally, voting without refresh by ralph on Friday June 15, 2007 @10:32AM (#28346)
On a related note, http://news.ycombinator.com/news.css returns a MIME type of text/html instead of text/css like it should. This causes warnings to appear in this browser's console.
Re:Finally, voting without refresh by eposts on Tuesday June 12, 2007 @03:15PM (#27559)
Is there no way to change your vote once you vote?
Re:Finally, voting without refresh by kyro on Tuesday June 12, 2007 @03:06PM (#27555)
Works great and very snappy. Thanks.
Re:Finally, voting without refresh by ralph on Saturday June 16, 2007 @05:12AM (#28523)
Yeah, thanks PB. It's a big improvement and cuts down bandwidth use a lot too.

I've peered at the Javascript and most of its obvious even without knowing Javascript :-) Might someone answer a few questions?

node.href just returns an empty text/html document when fetched. Does this happen synchronously or not? What do browsers do when they're given text/html as the content of an image and what do the specs define they do? When is ping freed? Is it automatic when it goes out of scope and does that suggest that the image fetch is synchronous?

I'm trying to understand what delays occur when and whether on a larger scale you'd need to manually free some of these resources.