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
8
votes
0 answers

Deploy React App on CDN, API Backend on Server?

Is there any non-trival benefits to hosting a SPA app (i.e. React) on the edge using a CDN provider like CloudFlare, but serve the API backend used by the SPA app on a regular VPS/dedicated server? The more common approach seems to be hosting the…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
8
votes
1 answer

Defining a dynamic Content Security Policy in a Single Page Application

I want to define a content security policy that allows loading images from any origin by default but restricts this to allow only a specific set of origins in some sections of the website. In a traditional website that makes a new HTTP request for…
8
votes
3 answers

How to host multiple React SPA apps on a single ASP.NET Core site?

I'm trying to run multiple React SPA apps using ASP.NET Core 3.1 with the lastest SpaServices extension and have a problem serving static assets. Much of what I've built comes from a similar question at: How to configure ASP.net Core server routing…
8
votes
2 answers

Laravel 7.x Sanctum (SPA) with Vuejs always returns 401 Unauthorized

So it's been several hours I couldn't figure out the issue even reading through and trying any possible solution available on the internet. I'm using Laravel 7.x with Vue js and struggling with Sanctum SPA authentication. Login request works fine…
Zee
  • 381
  • 2
  • 11
8
votes
2 answers

Disable Refresh Token in Keycloak

We have an Angular SPA that is authorized by OIDC using the Implicit Flow. We use Keycloak as our authorization server. The Access Token has a short lifespan and is refreshed regularly via a hidden iframe. After reading that the Authorization Code…
8
votes
4 answers

Blazor Chrome caching issues

I have this Blazor SPA I have published to IIS on a webhotel. My problem is that Chrome is somehow caching my Blazor assembly so no matter how many times I redeploy I still get the old dll. I can start up a new clean Chrome with chrome…
8
votes
1 answer

How to securely store an API key in static website

I have a SPA website that is hosted in AWS s3 and served by cloudfront There are multiple CNAMES that connects to this website, e.g. A.Mysite.com, B.Mysite.com I have an API that the static website connects to that only want to serve content for A…
m8chor
  • 113
  • 1
  • 4
8
votes
1 answer

Different css files in Blazor pages

I want to use different css files for different layout and pages in Blazor. So, I don't want to import all css files directly into index.html but into every single page or layout when it needs.
Emba Ayyub
  • 657
  • 2
  • 7
  • 12
8
votes
3 answers

Capture or save a current state (HTML elements) of a dynamic page from a SPA

It's possible to retrieve current state from a SPA (made on frameworks like Angular, React, etc)? By current sate I meant a snapshot/save/export of all current HTML elements, as well styles/images and the data being shown at the moment? So can be…
Paulo Oliveira
  • 2,411
  • 1
  • 31
  • 47
8
votes
4 answers

Is it possible to use Angular JS for JAMstack architecture?

I am in need to implement a static SPA with JAMstack architecture. I know we can user ReactJS/VueJS for JAM based implementation. But I want to know is it possible to use Angular for JAMstack approach? https://dev.to/leomeloxp/what-is-jam-stack-2957
8
votes
2 answers

How to restrict page access to unlogged users with VueJS?

I'm currently practicing VueJs and making some sample apps. i'm making a very simple app that is basically just a login page where users will put their credentials and access their profile. However I can't think of a way to restrict view to the…
8
votes
1 answer

How to redirect all request to index in react or angular using htaccess?

I am creating an application in react using react-router. Earlier I was doing the same with angular but in both cases, if a user bookmarks a URL and loads it directly. It will show 404 error. can we create such rule in htaccess so that the URL…
Dhanraj Acharya
  • 473
  • 1
  • 4
  • 15
8
votes
1 answer

How do I reload page on click of Vuetify Button?

I need to refresh the current page when a user clicks the refresh button. I'm using Vuetify to generate the button. refresh I know in place of the router I can specify
Jeff
  • 150
  • 2
  • 2
  • 7
8
votes
1 answer

Error in mounted hook: "Error: An AuthUI instance already exists

I building a single page app using Vuejs and using Firebase for authentication. So far I got sign in and sign up to work with no problems. The issue I am having now is with Social Authentication. When I load the sign up page the social buttons…
KD1
  • 107
  • 1
  • 15
8
votes
2 answers

Using MSAL.js in SPA for Azure B2C Authentication - Pop up window an issue?

So I was thinking of using MSAL for authentication against the AZURE B2C Identity Provider, but from what I can see by looking at the code, MSAL is dependent on pop up windows for logins. (Please correct me if I'm wrong). My question is, given that…