Defresh - Cut your site's link load speed time in half with 1 <script> tag

Project URL: formerly

Defresh is a site that me and @doubledev0129 (formerly @idodev) have created. It’s a free-to-use software that makes your link loading time way faster.

It does this by not reloading the page when you click on a link.

How was this done? With a combo of AJAX and the history API, called PJAX More info here.

I’d love your feedback!


DerDer56 (& @doubledev0129)


hmmm, i like the project! but the github link returns a 404

1 Like

fixed it just now! lol

1 Like

WOW! Great job!!!

1 Like

here’s the link anyway:

thank you very much! :smile:

Hi, thanks for opening up a discussion about this.

Main question from me: what makes it faster to load a page with AJAX and render it with document.write?

Also, could you describe how you found that it cuts your site’s link load speed time [sic] in half?

we ran some simple tests using to find the difference between the link click and page load, and the ajax was around 1.9 times faster, which is very close to 2. nice question though!

This looks neat. Could you publish this to NPM? That way it could get on jsdelivr and cdnjs.

1 Like

You should also support touchscreens with the touchstart event

1 Like

but the onclick works on mobile 2

Brave thinks you’re giving a 404 error, it’s asking if I want to find the page on wayback machine.
This is glitch also so you might wanna set some limits for max pages otherwise a page with lots of links will make lots of requests.

1 Like

i changed the hosting to github tho

1 Like

Could you also minify it?

1 Like

ok, no problemo, thats a good idea

regular will be moved to

ok, i minified it! thank you 4 the idea!

1 Like

Expect some down time from the site, beacuse we are acquiring a domain,


hmmmm, seems promising…

1 Like

Here are some ideas you should consider

  1. For really heavy sites preload all the links within the region of the viewport(where the user can see) and download more when the user scrolls and make sure to delete the old links
  2. Use an optional special protocol with the server to be able to request multiple pages with one request
  3. Detect low bandwith and automatically disable/enable some features
  4. Not sure if this is possible with the capabilties of js but don’t load images and videos and iframes until the users scrollbar is near
  5. For downloads preload only the first 100kb or some number of data