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

How to improve SEO for single page application

We have built a search-engine for vacancies. For reasons of speed and a good user-experience, we used a the architecture of a “Single Page Application” (SPA). We know that for a SPA-architecture it is a challenge to enable SEO, so we did quite a…
17
votes
4 answers

Forcing a single page application to update

For single page apps, what methods are there for forcing the page and/or JavaScript files to be reloaded when there have been updates deployed to the server? One obvious way would be to poll some server resource to see if the current version of the…
Ronnie Overby
  • 45,287
  • 73
  • 267
  • 346
17
votes
5 answers

Can I use the browser Navigation Timing API for Ajax events in single page apps? If not, what's a good tool?

We've got a single page app built with Knockout and Backbone which makes Ajax calls to the server and does some complex data caching and DOM rendering. We're really like to measure the performance (and log it back to the server) as seen by the user.…
17
votes
4 answers

NancyFX Catch All route

Does NancyFX supports ASP.NET MVC like 'Catch All' route? I need one, that basically match every URL. This is very handy for building up Single Page applications. Is that possible?
Alexander Beletsky
  • 19,453
  • 9
  • 63
  • 86
16
votes
4 answers

404 Error on refresh with SPA React Router app in GitHub Pages

I built my website with React and React Router and it is hosted on Github Pages. When I refresh the site on a page that is not my home page OR do ctrl+click to open the page in a new tab, it leads to a 404 error. I know this is because Github pages…
Christine
  • 161
  • 1
  • 1
  • 3
16
votes
2 answers

Server side rendering with next.js vs traditional SSR

I am very used to the approach where SSR meant that the page got a full refresh and received a full HTML from the server, where it gets rendered with razor/pub/other depending on the backend stack. So every time the user would click on the…
16
votes
4 answers

Next.js single page application?

I am trying to make a single-page application in Next.js, but I am starting to think this is not possible. Can anyone show me how? My first attempt was to use a HashRouter:
Home    …
user2410449
  • 373
  • 1
  • 2
  • 11
16
votes
2 answers

Is it insecure to include your login page in your single page application?

My understanding is that, if you include your login page in your SPA, then the user is receiving all of your code before they're even authenticated. And yet, it seems to be a very common practice. Isn't this incredibly insecure?? Why or why not?
bumbleshoot
  • 1,082
  • 2
  • 17
  • 32
16
votes
6 answers

npm install stuck at extract: zone.js

I am not an expert on JS so this problem might have an easy solution. I am trying out .Net Core Angular SPA template. When I try to run npm install command, it gets stuck on extract:zone.js step. Here is the command output. D:\Projects\UI>cd…
Rahul
  • 400
  • 1
  • 3
  • 15
16
votes
2 answers

How can I serve robots.txt on an SPA using React with Firebase hosting?

I have an SPA built using create-react-app and wish to have a robots.txt like this: http://example.com/robots.txt I see on this page that: You need to make sure your server is configured to catch any URL after it's configured to serve from a…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
16
votes
2 answers

typescript can't find module less

I use react and webpack to build web SPA but, typescript can't find resolve the less file work file like this ⬆️
pssgo
  • 211
  • 2
  • 3
  • 6
16
votes
2 answers

Integrating a React SPA with hotjar heatmap tracking

I am trying to integrate the Hotjar library to track heatmaps for users in our React SPA. I have followed the general tutorials but I have not been able to get this working. I have the standard Hotjar tracking code in the element of the document. I…
daveGeo
  • 323
  • 1
  • 3
  • 9
16
votes
1 answer

ASP.NET Core Angular Template: app.module.client vs. app.module.server

Microsoft provides a fantastic template for developing Angular (not AngularJS) in ASP.NET Core as outlined in their article "Building Single Page Applications on ASP.NET Core with JavaScriptServices". While it's very straightforward, there is one…
16
votes
2 answers

Inherit imports from parent module to child module in Angular2

I made an Angular2 app like described here. It has two components (A,B) which are imported by the global app.module. My idea was, to include shared modules in app.module, so I don't need to mess up every module with redundant code. I want to do that…
Lion
  • 16,606
  • 23
  • 86
  • 148
16
votes
1 answer

Angular 2 VS Aurelia ? 2017

I have been evaluating many SPA frameworks. I am stuck with following two and cannot decide which one should I use for my coming project: Angular 2 Aurelia Both framework promises great deal of operations. I was really excited about the angular 2…
Riy
  • 479
  • 1
  • 8
  • 16