News for hackers. Stuff that matters.
Re:Ask YC: Feedback on my site No-NSFW, The Not-Safe-For-Wor... by Husafan on Thursday April 03, 2008 @05:33PM (#154307)
Why do you need to rewrite links to your server? Can your extension not insert JavaScript to do most of this logic client-side?
Re:Ask YC: Feedback on my site No-NSFW, The Not-Safe-For-Wor... by ptm on Thursday April 03, 2008 @05:38PM (#154313)
Actually it uses Javascript to rewrite links.

But the info about links being safe of not are contained in the server links. I could pre-emptively get info about all links, but that would slow down Firefox.

Re:Ask YC: Feedback on my site No-NSFW, The Not-Safe-For-Wor... by marrone on Thursday April 03, 2008 @06:35PM (#154352)
Traversing the entire DOM on page load and rewriting all links for large pages would also slow down the page though.

Also rewriting links seems too intrusive for my tastes and means I cant "Copy link location" which I frequently do. I like the idea, but I personally would have just used a single "click" event handler on the entire page using the capturing phase and hijack links to redirect through your site first, rather than doing a rewrite for every link in the dom

Re:Ask YC: Feedback on my site No-NSFW, The Not-Safe-For-Wor... by Husafan on Thursday April 03, 2008 @06:25PM (#154347)
Gotcha. Well maybe you could do this asynchronously, after page load? Once the page is done loading, extension fires off for info about links on the page? Assuming this didn't take to long, it might be doable before they clicked a new link.

Also, extensions have access to cookies per domain? Maybe the extension could use this to cache results for a given page client-side?

Re:Ask YC: Feedback on my site No-NSFW, The Not-Safe-For-Wor... by ptm on Thursday April 03, 2008 @06:50PM (#154366)
I could do that.

I had decided against it earlier due to the potential lag.