javascript - Do I really need to use ajax for non-page-loading website? -
To talk directly, I'm preparing an online test series (/ objective exam) website with PHP. Let me tell you that, I want to load the entire test series at one time, so that after starting the test, the user will not have to wait for the next or previous questions. (I'm trying to do this with AJAX). I also keep a 'question map' for tracking and tell the user about the questions that are being tried as a related demo GUI picture.
Now I have There are 2 questions. 1) Is this really possible? To maintain the question map, if the system is loading the next page without calling the database (as is the Ajax) 2) How to do and whether I really need to use AJAX template for my purpose
Note: I want all new questions to be loaded with no minimum / minimum page load, but proper DB calls should be maintained. Any suggestions are appreciated or any new way of getting it ??
First of all, you are a bit confused about AJAX. The AJAX primary method for client side calls is to use javascript to call database after opting to use the server side language, such as PHP or C # WWD / ASP.NET. .
What you are asking, if you can load a large amount of data on the page load and then organize it with javascript it is entirely possible. However, in order to store data, this requires large database calls, as well as more memory (RAM), and time is extended to load the data. RAM factor should be relatively small, and AJAX will provide subtle customization only for that, unless your data is relatively efficiently stored and is not incredibly large scale, you should pay attention that the database call is expensive quickly If you choose to load all data on page load, will the user consume all those data? If not, then you are wasting your computer's memory, at the time they take the page to load, along with their bandwidth, make unnecessary calls from their own database unnecessarily.
So your main concerns, IMO, should be time of loading the page and reducing the number of unnecessary calls to the database. Can the amount of data be loaded on a negative timeline? Are you sending hundreds of records? If you send it in one time, the user will consume all the data (many websites have 30-50% bounce rates, which means that 30-50% users should leave immediately)? Will the part of the data be better and the half will not be sent until it is ready for the second half?
It seems that you are only calling data for a small quiz, which is relatively trivial. As if your 20 questions have been loaded, and 4 answers, you should just use server-side calls. On the other hand, if there are hundreds of questions, with so many external data, you probably should use AJX.
Comments
Post a Comment