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
22
votes
4 answers

Host a static site single page app in Google Cloud Storage with routes

There are guides and questions all over the place on how to do this, but never really a concrete answer that is satisfactory. Basically, I'm wondering if it's possible to host a static SPA (HTML/CSS/JS) in GCP Cloud Storage. The main caveat of this…
Matt Dodge
  • 10,833
  • 7
  • 38
  • 58
22
votes
2 answers

Angularjs: ocLazyLoad vs Requirejs

I'm working on a big angluar project and obviously we need a way to lazy load our scripts. I've worked with require.js before and it's quite good, but the problem is that after we concatenating and minifying our files, we got a 1.5M js file. So i…
Tomer
  • 17,787
  • 15
  • 78
  • 137
22
votes
3 answers

what is {version} in ScriptBundle("~/scripts/jquery-{version}.js")

I try to get started with MVC SPA apps, and I noticed in BundleConfig the following: ScriptBundle("~/scripts/jquery-{version}.js") How this works? What is {version} and where it it taken from? And where can find more information this, how…
bzamfir
  • 4,698
  • 10
  • 54
  • 89
21
votes
3 answers

Hosting SPA with Static Website option on Azure Blob Storage (clean URLs and Deep links)

I have succesfully set up a static website on Azure Blob storage using the $web container as advised within the Microsoft documentation. In addition, I have defined index.html for both the 'Index Document Name' and the 'Error Document Name'. This is…
21
votes
1 answer

Angular 6: Multi Page Application (MPA) is possible?

After spending the whole day on Google, my question remains unanswered. As I am new to creating Angular app using version 6.0.4. my first and simple question is: Is it possible to configure Angular app with multilevel landing pages? Example:…
Amit Shah
  • 7,771
  • 5
  • 39
  • 55
21
votes
2 answers

How do I return a HTTP 404 status code from a SPA?

I saw a few questions like this around (like this one), but none of them tackle the problem specifically. So Google is now supporting SPAs and most web browsers do HTML5 pushState. My AngularJS (but could be any JS thing) website is using the URL…
Mauro
  • 3,946
  • 2
  • 27
  • 41
21
votes
1 answer

How to setup NGINX to deploy different Single Page Apps (SPA's... i.e static files) depending on location (under same server_name) with subroutes

My goal is to setup two different single page apps (SPA) under the same domain, where we show the SPA corresponding to the location / path requested. I also want to default to one of the two SPA's on / location. And.. I want the html5 history…
Joel Quiles
  • 811
  • 1
  • 9
  • 16
20
votes
2 answers

What are the differences between JAMstack application and SPA

This might be a silly question, but I'm just starting now in Web dev, and I am especially new in JAMStack. I've been reading a bit, and from what I get, in JAMStack basically, we give everything to the frontend app so the Javascript can be like our…
Alex Ramalho
  • 406
  • 4
  • 12
20
votes
2 answers

How to track page view with Firebase Analytics in a web, single page app?

I am trying to track simple events and pages/views through Firebase analytics. I have a progressive web app, (SPA). It's a fullscreen game and it is not using browser history. I am a bit confused by Google's docs to be honest, sometimes they only…
20
votes
3 answers

Azure CDN Microsoft Standard Rules Engine Rewrite URL for single-page-application

We try to configure Azure CDN on Microsoft Standard pricing to allow us rewrite Url to route all application routing to ./index.html. How to setup rules engine to rewrite url but left all js file as it is? All examples in google show how to do this…
CrazyBaran
  • 572
  • 3
  • 20
20
votes
2 answers

Detect an URL change in a SPA

I would like to listen to path changes in a SPA which is not maintained by me. I found one solution here: https://stackoverflow.com/a/44819548/7042552 But still, it seems kind of "hacky" to me - but still my implementation is like this: let url =…
wasddd_
  • 937
  • 2
  • 10
  • 19
20
votes
2 answers

Why is Angular called a single-page application?

One of the most common terms associated with Angular(JS) is SPA. Why is Angular(JS) called a single-page application? Even if the URL changes in an Angular(JS) site will it be called an SPA? Are all the site created using Angular(JS) really a…
S.Pradeep
  • 487
  • 1
  • 5
  • 16
20
votes
6 answers

Configure spring boot to redirect 404 to a single page app

I want to configure my Spring Boot app to redirect any 404 not found request to my single page app. For example if I am calling localhost:8080/asdasd/asdasdasd/asdasd which is does not exist, it should redirect to localhost:8080/notFound. The…
Vololodymyr
  • 1,996
  • 5
  • 26
  • 45
20
votes
2 answers

How to work with hybrid webapp (MPA and SPA combined)

What are good practices about building a multiple page application using modern JS frameworks? Multiple page application In multiple page application we have multiple templates using some “template syntax” to provide us with backend data and AJAX…
dagi12
  • 365
  • 3
  • 13
20
votes
9 answers

Is there a configuration in Github Pages that allows you to redirect everything to index.html for a Single Page App?

I'm trying to post my SPA app that works fine locally but when I push it to Github Pages, the interior pages don't register if you navigate to them directly. For example http://USER.github.io/PROJECT_NAME/ works but…
tkiethanom
  • 537
  • 2
  • 6
  • 21