News for hackers. Stuff that matters.
Re:I redesigned Hacker News (But I used the API this time) by claxo on Wednesday July 10, 2024 @12:58AM (#40923839)
- More legible than HN, a combo of size and color - Too much space below short entries ? - Context menu (rclick) on links hijacked, no 'open in new tab'
Re:I redesigned Hacker News (But I used the API this time) by jasontheone111 on Wednesday July 10, 2024 @02:07PM (#40929673)
It opens in new tab by default when you click on the source
Re:I redesigned Hacker News (But I used the API this time) by pndy on Wednesday July 10, 2024 @01:59AM (#40924104)
Re:I redesigned Hacker News (But I used the API this time) by smt88 on Wednesday July 10, 2024 @02:59AM (#40924362)
Far, far worse on iPhone 12 Mini. Genuinely unreadable.
Re:I redesigned Hacker News (But I used the API this time) by jasontheone111 on Wednesday July 10, 2024 @02:06PM (#40929658)
I forgot to add adaptive CSS.
Re:I redesigned Hacker News (But I used the API this time) by OuterVale on Wednesday July 10, 2024 @03:08AM (#40924407)
I loaded it up, and it hung fetching things for ~5 seconds. Part of what makes Hacker News great is its speed and simplicity.
Re:I redesigned Hacker News (But I used the API this time) by GaryNumanVevo on Wednesday July 10, 2024 @07:48AM (#40925857)
Same here, incredibly slow to load
Re:I redesigned Hacker News (But I used the API this time) by gabrielsroka on Wednesday July 10, 2024 @11:05AM (#40927716)
I like some of it, but:

1. it's really slow.

2. it made 30 requests to load 2 comments, including fetching the same url 5 times.

3. you call the APIs in serial, but you can (should) do it in parallel.

4. you're using async=false on `xmlhttp.open("GET", filePath, false);`. this is a bad practice. also, consider using `fetch` which is a more modern API.

5. you can omit `?print=pretty` and the fetch will be smaller, probably parse faster, etc.

6. the back button doesn't work

compare my version (which does much less, but does it faster) https://github.com/gabrielsroka/gabrielsroka.github.io/blob/... and https://gabrielsroka.github.io/hn.html?small

Re:I redesigned Hacker News (But I used the API this time) by jasontheone111 on Wednesday July 10, 2024 @02:06PM (#40929661)
Thank you for the info, I will work on speeding up my website :)