Ajax-Free Website - Pros and Cons of Single Page SPA Applications
Classic sites and web applications consist of several pages, each with its own address. It was like this for a long time, until projects began to appear without page reloading. These resources are called single page application (SPA) . Single page apps have their pros and cons.
The concept of SPA implies that the site has only one page (in some cases, several), all content is loaded dynamically, and the page addresses in the browser are substituted by scripts - the page address changes are emulated. To preserve the ability to navigate the pages, a special API is used - for example, the History API or the new features of HTML5. Such projects are gaining increasing popularity nowadays.
Should I make a site without page reloads , only on Ajax? Each technology, especially a new one, has its own advantages and disadvantages. Let's take a look at the pros and cons of creating websites without reloading the page.
First, good news, advantages of sites without page reloading are as follows:
- the site works as a desktop application , only through an intermediary - a browser;
- saving user traffic , because instead of refreshing the entire page, only the changed part is loaded;
- server load balancing - heavier code fragments can be executed with a small delay, which allows to speed up the site as a whole;
- smooth loading of the interface;
- no need to come up with nice URLs for important pages and so on.
Now let's look at the flaws of sites without page reloading :
- problems with indexing content by search engines and SEO-promotion - although search engines are adapting to new technologies, the problems are still relevant. It is necessary to use special means for delivering content to search engines, which can be regarded as cloaking;
- the complexity of debugging and error detection;
- lack of real URLs that can be bookmarked and where you can link to your favorite content. Or the need to emulate them - substitution by a script in the address line;
- interface hangs and empty blocks in case of loading error;
- the complexity of maintaining site statistics.
Thus, having considered the pros and cons of sites without reloading pages - you can draw conclusions about the advisability of using SPA technologies for your project. You can also use a combined approach - make only some blocks on the page dynamically loadable. This will allow increase your site speed , in some cases significantly. The implementation of SPA technologies on your website can be ordered by leaving a simple application.
- IT / Misc 08.07.21 How to make a free translation for a website without an API, translate documents in Google Translate
- IT / Misc 06.07.21 How to make a subscription button on a website, a subscriber base and automatic mailing
- Food / Misc 06.07.21 How to quickly cook delicious fried pies with potatoes and onions
- IT / Misc 04.07.21 Caching - create, load and reset. Where to store the cache, methods and types of caching
- IT / Database 03.07.21 Custom NoSQL - storing data in files and not only in a database. Storing settings, small data and caching files