Live data from Hacker News

Intercooler.js – Making AJAX as easy as anchor tags

github.com

1–10 of 156 posts

Re: Intercooler.js – Making AJAX as easy as anchor tags

#4
I'm surprised this needs jQuery. What this seems to be is a simple script that fetches a resource and places it into an element. I really feel opposed to adding more dependencies where they aren't required. That could be written without jQuery or this library fairly easily.

Re: Intercooler.js – Making AJAX as easy as anchor tags

#6
I was a long time pjax/turbolinks user but always felt like I was pushing the boundaries of what these technologies were doing and always wished for more functionality.

I tried out several client side frameworks but always felt like it was way overkill for the apps I built.

I gave intercooler.js a try a few months ago and was extremely pleased. There's very little server side that's required and the extra functionality I had wanted from pjax was there.

If you're wanting the simplicity of server side rendering plus the feel of an SPA without the frontend complexity give this library a try.

Re: Intercooler.js – Making AJAX as easy as anchor tags

#7
It would be cool if this could some how use DOM diffing (I assume it just uses innerHTML now), so you'd get minimal dom updates with the advantages of doing everything server-side that this already provides you. Throw in some smart service worker caching and you get pretty close to the responsiveness of a fully client-side approach.

Re: Intercooler.js – Making AJAX as easy as anchor tags

#8
post #5

I love that you can use this without having to build anything with babel/webpack. Given the scope of my web apps, anything that transpiles or mutates my sourcecode is a non starter because it makes debugging it weird since I'm not looking at my own code anymore.

Have you tried to use source maps?

Re: Intercooler.js – Making AJAX as easy as anchor tags

#10
post #4

I'm surprised this needs jQuery. What this seems to be is a simple script that fetches a resource and places it into an element. I really feel opposed to adding more dependencies where they aren't required. That could be written without jQuery or this library fairly easily.

Well, this exists

http://userbag.co.uk/demo/pjax

https://github.com/thybag/PJAX-Standalone

Post reply on HN