Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

499
Views
Is there only 1 HTML page (index.html) on a Single Page Application website?

I am new to web development with minimal experience in HTML/CSS and some JavaScript. I recently started looking into the front-end framework Vue.js and was confused about the Single Page Application concept.

While browsing the Vue.js documentation website, I noticed that every time I click on a different documentation guide link (see below) they all seem to have different HTML pages in the URL.

For instance, the 'Installation' has the URL https://v1.vuejs.org/guide/installation.html and 'List Rendering' has the URL https://v1.vuejs.org/guide/list.html. They both seem to have different HTML pages as seen from the URL, but shouldn't there only be 1 HTML page on a SPA website?

https://v1.vuejs.org/guide/installation.html
https://v1.vuejs.org/guide/list.html

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Yes, technically there is only 1 HTML page - the index.html. Vue generates so-called single-page applications. Vue has a router that, roughly speaking, simulates subpages by manipulating the URL. The content of www.example.com/about/us is still displayed via the index.html. Under the hood, of course, it's much more complex.

However, other Vue frameworks such as Nuxt can also generate static pages in the build process (not in "realtime") to improve SEO. These in turn are "real" HTML pages.

over 4 years ago · Santiago Trujillo Report

0

Early SPAs tended to have a single index.html file which contained a skeleton HTML document and then populated it (using client-side JS) with content based on the URL.

Modern approaches prefer to have each different URL serve up a useful HTML document and then use JavaScript to change it as the user navigates through the app.

This tends to render content on the user's screen faster (as the content is just there and doesn't need to be fetched as a second step with JS), is better food for search engines, and works even if the JS fails for some reason.

There are two general approaches for this:

  • Sever side rendering (in which server side code generates the HTML, typically using the same code as would run in the browser). This approach is most useful for content that is updated frequently (e.g. with a CMS).
  • Static rendering (in which the HTML documents are generated at build time before the app is deployed. This approach is useful for deploying to servers which doesn't support server side programming (e.g. Amazon S3 or Github Pages) so is good for the budget.

Both these approaches are supported by Nuxt (which uses Vue) and Next.js & Gatsby (which use React).

Note that server-side rendering gives you multiple URLs that serve up different HTML documents, while static rendering gives you multiple HTML files.

over 4 years ago · Santiago Trujillo Report

0

Different url route doesn't mean different files. Single page application means you can navigate through all the pages without refreshing the website. It just renders different views according to user preference. YouTube is a fine example of single page application.

Index.html in single page apps are generated from index.js in such cases which further get associated with different routes and components. Technically, there is a single html page: index.html

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!