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
16
votes
2 answers

How do I persist a session using OAuth 2.0 after authorization through a third party service?

I'm implementing an OAuth 2 based authorization model for an application I'm developing. I'm offering end-users the ability to login with Facebook or by setting up an email/password account with my API. The email/password authentication is…
Ben Harold
  • 6,242
  • 6
  • 47
  • 71
16
votes
5 answers

JWT and one(!) session per user / no concurrent sessions

Our current app uses HTTP sessions and we'd like to replace that with JWT. The setup allows only a single session per user. This means: User signs in at Device 1 User is logged in at Device 1 (new Session created) User signs in at Device 2 User…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
16
votes
2 answers

How to modularize AngularJS applications / plugins

I have a couple of (software-)architecture questions regarding a migration from Grails (REST-API, parts of AngularJS, MongoDB, Tomcat, Spock, several plugins) to Node.js + Angular.js. I probably have to explain the structure of the Grails project…
16
votes
9 answers

How to handle expired files without refreshing the browser when using Single Page Application (SPA)?

I have done a full Single Page Application (SPA) application using Angularjs. So far so good. As anyone knows, all javascript files are loaded in the first time access. Or, some file are loaded in lazy mode style when needed. So far so good... The…
Ismael
  • 2,330
  • 1
  • 25
  • 37
16
votes
2 answers

Durandal Caching Issue / Versioning Strategy

What's a good strategy for versioning Durandal js and html files? I noticed that, during development, your browser cache must be disabled in order for you to receive up to date files on each refresh. This is a must for during development. However,…
Alexander Preston
  • 1,665
  • 11
  • 15
16
votes
3 answers

Single Page Application Authentication

My company is re-writing its e-commerce site as a single page application using the new Web API / SPA features in MVC 4. We're not sure about the best way how to handle authentication. Specific questions: How do we handle both encrypted and…
15
votes
1 answer

Angular routes contain #! in the url instead of #

Recently I have noticed that when using ngRoute module in an AngularJS app, the route contains #! in the URL, which was earlier just the #. For example, www.webiste.com/#/login becomes www.website.com/#!/login I have to enable the html5Mode and also…
15
votes
3 answers

Node js as http server and host angularJS SPA

I have an application written on angularJS and built by grunt. Is there a way I can create a http server from node js and host it there. Please share any code snippet or document which would help. Thanks
dhana
  • 163
  • 1
  • 1
  • 6
15
votes
2 answers

Single page applications and
elements

Are there still any benefits of using a element instead of let's say a
element in the context of a single page application? The purpose of the element makes sense to me if the "form" submission isn't made with an ajax call (I'm…
user1834464
15
votes
4 answers

How to disable cookies in Laravel 5?

I'm having single-page app made on Laravel 5.1. I use localStorage to keep API key and I don't need cookies. Laravel creates two cookies for me: XSRF-TOKEN laravel_session If I set SESSION_DRIVER to array in my environment config, laravel_session…
Robo Robok
  • 21,132
  • 17
  • 68
  • 126
15
votes
2 answers

How to handle multiple auth strategies on a sails.js SPA?

How to handle multiple auth strategies on a sails.js SPA ? I'm building a single page app built on Angular for the front-end and sailsjs for the backend. Right now I'm using sails-auth (which uses passportjs internally) to bind my authentication…
15
votes
5 answers

Remove authentication in ASP.net MVC single page application

I am trying to play about with the asp.net MVC SPA template in visual studio 2013, I don't need any of the authentication bits, I just need to load directly onto one of the controllers pages. How do I get rid of all the authentication stuff from…
colobusgem
  • 473
  • 1
  • 4
  • 18
15
votes
3 answers

How to avoid $compile:tpload errors on 401 status code response

We are developing a Single Page Application with AngularJS and ASP.NET MVC Json Rest API. When an unauthenticated client tries to navigate to a private route (Ex: /Foo/Home/Template) to get a template, it gets a 401 response from the Web API and our…
15
votes
1 answer

How to show/hide ReactJS components

Trying to learn ReactJS.. but what confuses me is the rendering of the component. Every example I've seen defines a React component class and at the end has something like: React.renderComponent( , …
user3317868
  • 696
  • 2
  • 9
  • 20
15
votes
2 answers

structure of a Backbone and React single page app

I've been using backbone.js for most of my frontend JavaScript projects so far, but after hearing about Facebook's react.js I got interested and started poking around. I'm wondering whether or not I'm supposed to use the Backbone.View class anymore…
Philipp Kyeck
  • 18,402
  • 15
  • 86
  • 123