we ran some simple tests using Date.now 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!
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.
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
Use an optional special protocol with the server to be able to request multiple pages with one request
Detect low bandwith and automatically disable/enable some features
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
For downloads preload only the first 100kb or some number of data
Suggestion: Open two projects one with and another without defresh. Record yourself clicking a link on both and use a video editor to put the projects side to side and slow them down a bit and turn it into a gif
Try checking if it endswith js. Also very rarely js files will not have the .js header and also glitch’s anticache makes stuff like cdn.glitch.com/somefile?v=23493842943
I suggest you perform split by split comparison on really heavy websites with images, lot of fonts and external resources, and maybe extensive resources and you can find out if it makes a big difference .
That’s a huge difference although I found a small glitch in the split-by-split comparison video where the styles break while loading for a couple of milliseconds before the styles load properly.
Im also thinking the same thing too. As the video recording clearly shows that defresh is faster than the normal refresh. Also i have caching disabled.
I found a small glitch in the split-by-split comparison video where the styles break while loading for a couple of milliseconds before the styles load properly.
Ajax is a set of web development techniques using many web technologies on the client side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behavior of the existing page.
Ajax isn’t a specific tool (like for instance jquery) but techniques to do async requests. I can recommend you to just use the FetchAPI and polyfills for incompatible browsers. Using jQuery is just waste.
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
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)