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

I feel like Fetch & Fetch Polyfills is almost-all-browser-friendly and lightweight.

im using an xmlhttprequest lol i got confused about the whole ajax/xml thing :slight_smile:

u can see more about whats going on here

404   

fixed it just now lol

i added a / after .js, returning an error

You could create a smaller version of pace.js while using Defresh.

1 Like

what’s that?

Pace.js is a JS library that allows you to add a loader (a real loader) that depends on AJAX requests to correctly depict a loading bar.

1 Like

but im using xml not ajax, would it still be possible

lol socketio kept using polling so the loading bar kept showing up every 5 seconds so I got rid of socketio temporarily
it’d be confusing if hovering on a link makes a loading bar appear

2 Likes

lol

I don’t think you completely understand what Ajax means. Ajax is basically the techniques to request data from somewhere without stopping the end-user navigating around your page.

There is numerous ways to do Ajax, some of which are using

  • XMLHttpRequest object.
  • ActiveXObject
  • fetch API.
  • jQuery $.get, $.post, $.update, $.patch, etc.
  • Axios .get(), etc
  • An other libraries that depend on fetch and XMLHttpRequest and ActiveXObject.

What is AJAX?

AJAX = A synchronous J avaScript A nd X ML.

AJAX is not a programming language.

AJAX just uses a combination of:

  • A browser built-in XMLHttpRequest object (to request data from a web server)
  • JavaScript and HTML DOM (to display or use the data)
2 Likes

ok, i was confused earlier but now i get it

Only if Axios was included by default like the Fetch API.

2 Likes

anyone could just use the defreshUnload() function to create one (a pace.js loader).

more

Update: Defresh is fully initialized on Glitchchord!