HomeUncategorizedDifference between SPA / SSR

Difference between SPA / SSR

SPA

A single page application is a type of special website that renders various responses as content to navigation actions without making requests to sengetøj dinosaure aprovechar pantalones largos para cortos new balance unterpronation zilveren heren ring Belgium custom baseball jerseys custom baseball jerseys адаптер за камери damen gürtel von gucci Austria stolove lampy pre deti harvey nichols yeezy stolove lampy pre deti levis 514 38×32 samsonite securipak rucksack custom made baseball jerseys zilveren heren ring Belgiumthe server. Instead of the default method of loading new pages SPA interacts with the web browser to rewrite the current web pages. The page does not reload at any point.

SPA brought a revolutionary approach in the application world with its interactive features. The old method of approaching server side to retrieve index.html included a complete request lifecycle. Let’s suppose all the forms are submitted by the client side but the server didn’t respond, this leads a state of confusion in the user mind whether they should resubmit the form or not. SPA made these problems disappear with its interactive and fast responding technique.  

Pros of SPA

  • Improved and easy to use interface
  • Less loading time 
  • Simplified mobile development 
  • The same backend can be used for native mobile applications and web applications.
  • SPA works very well with a rich user interface with an abundance of features
  • User don’t need an extra query to server to download pages

Cons of SPA

  • Memory leak in JS can cause the system to slow down 
  • Less secure due to the Cross site scripting 
  • Heavy frameworks are slow to download
  • If mobile devices are less capable performance is a big concern 

SSR

The initial page of most of the websites is generated on the server that browser downloads. SSR (Server side rendering) is a special technique in the web development field that employes effective scripts on a web server that produces customized responses for each user’s request. Modern JavaScript framework/libraries that focus on creating user interactive websites/SPA are reducing the load time to a drastic rate.

SSR frameworks do not replace the template engine on the server side. It is totally different from handlebar, pug,ejs.

Pros in SSR

  • Better SEO since search engine can crawl into the depth of the website
  • Initial page loads faster 
  • No empty <body> tags
  • Works exceptionally well with a static website.
  • SSR supports bots likes Twitter and Facebook
  • Degradation is not that bad. Since fewer features are present in the old version of the browser but they work well.

Cons of SSR

  • Cost related to the server 
  • SSR requires Cloud or server to render the initial page hence involves complexity.
  • Static site development is no longer valid since hosting on firebase requires firebase cloud functions.
  • SSR alone does not guarantee the best results, CSS is required to give the user the desired result.
Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: