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
13
votes
1 answer

How is server-side rendering compatible with single-page applications?

My problem is that I'm unable to understand how server-side rendering single-page application frameworks like Next.js receive prerendered, full HTML on the front end without having to rewrite the entire page. For example, the nextjs website states…
13
votes
6 answers

Why isn't django serving my SPA static files correctly?

I'm building a website using a Django backend and Vuejs frontend. In development I started the backend and the frontend separately with python manage.py runserver and yarn serve respectively. This worked great and I now want to deploy the website.…
kramer65
  • 50,427
  • 120
  • 308
  • 488
13
votes
2 answers

Google Sign-In with Backend Verification Flow Clarification

I've spent hours trawling through various tutorials and articles and am finally giving in to asking. I want to enforce the use of Google Sign-In authentication for all users of my Angular 7 application. However, once Google authentication is…
13
votes
1 answer

How to debug Angular SPA in either vs2019 or vscode

This may be a stupid question, but I can't figure out how to debug my whole application in either vscode or vs2019 community. If I use vs2019, I can debug the api, controllers, etc just fine, but can't debug the typescript or js. If I use vscode,…
13
votes
2 answers

Blazor onclick event passing in counter from loop

I'm currently implementing table paging via a home grown solution in Blazor and coming across some difficulty. The troublesome piece of code is below (this is for rendering the paging buttons below a grid): @for (int i = 0; i < vm.TotalPages;…
GregH
  • 5,125
  • 8
  • 55
  • 109
13
votes
2 answers

Security of storing Bearer token in cookies

My SPA uses React as front end and laravel API as backend. When the user logs in (via axios and api), the api returns an access (Bearer token) as response. I use the react-cookie framework to store the access token as cookie in the Browser. This…
13
votes
1 answer

Login Page Separated From Single-page Application (SPA) in ReactJS

I am developing a single-page application (SPA) in ReactJS, and I would like to know how can I have the Login page in a separate page. I am using create-react-app as a base for my application, and I am currently defining the template for my SPA in…
13
votes
2 answers

Incorporate Keycloak login into SPA

We're currently evaluating Keycloak as our SSO solution and while it works for our servlet-based applications there's a question regarding our (React-based) SPAs. What our designers want: as an example let's say we have an email client spa. The user…
Thomas
  • 87,414
  • 12
  • 119
  • 157
13
votes
4 answers

How to render file in Rails 5 API?

I have a single-page application written in React with Ruby on Rails back-end (API mode). Rails is also serving static files. I'm pointing Rails router to public/index.html, so my SPA could manage his own routing with react-router. This is common…
yeasayer
  • 848
  • 2
  • 12
  • 22
13
votes
1 answer

Angular2 How to clean up the AppModule

I've been using the tutorials online and created an 'ok' SPA data entry application. I have it connecting to my WEB API fine but have only built out one Model and already my AppModule has quiet a few lines. I'm thinking forward and using the current…
Glenn Sampson
  • 1,188
  • 3
  • 12
  • 30
13
votes
2 answers

How to notify GoogleBot about 404 pages in Angular SPA?

probably duplicate question Best way to set up 404 pages in a angular SPA? but I didn't find a reliable answer for my question . I'm curious to know if there is a way to tell googlebot about a 404 page ? there is a tag for this purpose called…
13
votes
1 answer

Include local web app into react native webview

Within my react-native app I want to show a webview, that loads a local html5 web application (single page app, SPA). I am able to load an html file, that is located within the relative folder webapp using var webapp =…
Rias
  • 1,956
  • 22
  • 33
13
votes
8 answers

How to handle php notices, warnings and errors in REST api?

In REST API a 200 response show a successful operation. PHP by default output the error message directly in the response body without changing response code. In SPAs, the response text is not directly visible to user. So when the application does…
Handsome Nerd
  • 17,114
  • 22
  • 95
  • 173
13
votes
1 answer

OPTIONS request makes application 2x slower?

I have very intensive single-page application that is using API. Let's say application is located at application.com. Now if I place API in api.application.com it will enable CORS thus all browsers will do OPTIONS request before the actual…
Stan
  • 25,744
  • 53
  • 164
  • 242
13
votes
1 answer

Using Breeze.js without Entity Framework

We are trying to develop a SPA using similar techniques and technologies as John Papa's Pluralsight courses (e.g., Web API, knockout, jquery, etc.). However, as a company, we decided to not use Entity Framework. We want to write our server-side…
lmttag
  • 2,499
  • 4
  • 26
  • 30