Questions tagged [single-page-application]

A single-page application (SPA) is a web application that fits on a single web page with the goal of providing a more fluid user experience akin to a desktop application.

A single-page application (SPA), also known as single-page interface (SPI), is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience akin to a desktop application.

In an SPA, either all necessary code – HTML, JavaScript, and CSS – is retrieved with a single page load, or partial changes are performed loading new code on demand from the web server, usually driven by user actions. The page does not automatically reload during user interaction with the application, nor does control transfer to another page. Updates to the displayed page may or may not involve interaction with a server.

Resources

5306 questions
9
votes
5 answers

NextJS: dynamic router.pathname does not show path, but filename - how to get words in path?

I'm making this as simple of an example as possible, I can include more code later if it needs more info to be resolved I'm using dynamic routes in nextJS. My app pulls results from twitter based on the keywords entered into the dynamic route via…
AveryFreeman
  • 1,061
  • 2
  • 14
  • 23
9
votes
5 answers

Why is React Js called as Single Page Application

I often hear and see posts regarding react is single page app but never understood what is SPA and many say that it doesn't reload the pages but i didn't understood why so could you guys please explain me with simple examples?
ali
  • 492
  • 2
  • 7
  • 18
9
votes
4 answers

How to avoid CORS preflight requests in Single Page Applications?

I want to build a Single Page Application (SPA) and noticed the following issue during separation of backend API (REST) and frontend assets (static vue.js code): When serving the index.html from another domain than the API backend, most of the…
9
votes
2 answers

"IDX10511: Signature validation failed" for Azure AD SPA application

I have an SPA application derived from the Identity Platform sample that originally calls a Graph API. I've changed the endpoint to call a local API. The SPA uses Azure AD for authentication. The API sample is derived from the VS 2019 project…
rbrayb
  • 46,440
  • 34
  • 114
  • 174
9
votes
1 answer

Standalone REST API & Standalone React SPA vs Django and React combined

I would like to create a React SPA, which is fed by querying a Django REST API. I was reading this, and I encounter this point: I see the following patterns (which are common to almost every web framework): React in its own “frontend” Django app:…
9
votes
1 answer

Best place/lifecycle method to set page titles in a single-page Svelte app

I'm getting started with Svelte and building a single-page application (using page.js as the router). I thought I'd have a separate component to produce the block, and when each component mounts it would write the page title to a…
Scott Martin
  • 1,260
  • 2
  • 17
  • 27
9
votes
2 answers

How to handle routes by VueJS in ASP.NET core using Endpoints?

Am trying to create a VueJS SPA with ASP.NET core in the backend Since dotnet SDK version 3.0.100 no longer supports Vue, I created a React app dotnet new react and swapped the ClientApp with a Vue app rm -rf ClientApp vue create…
Salim Djerbouh
  • 10,719
  • 6
  • 29
  • 61
9
votes
2 answers

Localising a PWA web manifest

Is there a way in which a web manifest can be localised? i.e. having multiple translations of name, description etc... I have thought of a couple of potential solutions but they each have pretty big drawbacks... Potential Solution 1 (preferred but…
9
votes
3 answers

Laravel Email Verification for Vue SPA

How can I implement Laravel's Email Verification on a Vue SPA with Vue Router? So far I have tried to handle email verification by altering the VerificationController verify and resend methods. I then created a new notification and added API routes…
Adnan
  • 3,129
  • 6
  • 31
  • 36
9
votes
3 answers

why is SSR faster than SPA and vica versa?

I've been reading a lot about SPA vs SSR and maybe I understand its real idea or maybe not. I'd really appreciate someone experienced who can tell my if my assumptions are right or mean something. Observation 1) SPA - client requests…
Nika Kurashvili
  • 6,006
  • 8
  • 57
  • 123
9
votes
2 answers

React Helmet not updating meta title tag

I've been setting my react.js SPA's page titles by doing: document.title = {some title} ...so far and it worked fine. Now, I also wanted to update the meta title tag and so I installed react-helmet. In my component, I've imported Helmet from the…
LinusGeffarth
  • 27,197
  • 29
  • 120
  • 174
9
votes
0 answers

Serving static files from Nginx proxy for ASP.NET Core SPA apps

As many know, it is recommended to use a proxy server for web apps served by an application server. Also, it is recommended to use the proxy to serve static files. For "normal" .NET Core apps the setup is simple. For example: location /css/ { …
9
votes
2 answers

Vue js for non SPA apps - loading components in with out the app component

I am very new to Vue.js and I am trying to figure out a few things about it. One of the things I would like to use it for is to implement components without creating an SPA. So in other words I can make a reference to components in a static page…
9
votes
2 answers

Scroll depth GTM - Gatsby

I have a problem with running of gatsby based pages with GTM scroll depth. The problem is that the gtm scroll depth isn't compatible with SPA and doesn't reset when moving to the next page. Does someone use any other script, to measure scroll depth,…
9
votes
2 answers

How to handle roles/permissions in an SPA (Laravel+Vue)

I have been hearing a lot of buzz about SPAs, so I thought let's give it a shot and I started working on an SPA project with Laravel+Vue. I started with making some CRUDs with the help of axios and vue-router. Everything worked out great, until I…