Comments (7)
Hi @knpwrs
Actually, Nuxt.js already render a page that can work without the JS on the client-side (because it's server-renderer).
For connecting to a server-side database, I would not recommend it because when navigating in the client-side, your page will have to render the data as well and since you want to protect it for only the server-side, it won't work.
Nuxt.js is made to create web-application based on API so the API call (http request from the server-side or ajax request on the client-side) will work for both environments.
from nuxt.js.
Unfortunately the API call won't work for a client without JavaScript which kinda makes server-side rendering moot except for the point of getting a fast initial render.
from nuxt.js.
@knpwrs if the client does not have JavaScript, it will reload the page, and you can use axios to make API call from the server-side as well.
from nuxt.js.
Is it possible load data to nuxt.js without creating additional http request from server-side, and send rendered html page to client?
from nuxt.js.
@Mirodil please take a look at this answer I wrote: #123 (comment)
from nuxt.js.
Thanks, from client side it works and looks perfect, but server side part bit odd.
from nuxt.js.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from nuxt.js.
Related Issues (20)
- Failed to resolve entry for package "crypto"/"zlib" HOT 4
- /user/ redirect to /user HOT 2
- Running logic post prerender HOT 2
- Deploys to netlify break after upgrading to 3.6.x HOT 2
- The CPU has been soaring, even in the middle of the night
- Separate the prerendering step from the build step HOT 2
- Allow defining type for getQuery() function via generic HOT 1
- Allowing more than a single fetch in useAsyncData HOT 8
- Missmatch nuxt version when package-lock is missing HOT 3
- Unclear what is Nuxt’s default build target HOT 2
- Static deployed nuxt 3 application still does not let me navigate HOT 1
- allow disabling JS in development mode as well as production HOT 3
- `nuxt.options.watch` not restarting dev server HOT 1
- middleware works only with import and no strings in definePageMeta HOT 2
- cdnURL from nuxt.config.ts doesnt show up in nuxt.options.app property in a module HOT 3
- Nuxt fails to load urls on linked module HOT 8
- The cache on the Cloudflare page does not expire HOT 1
- Client-only components cannot access `this` in the render function HOT 1
- Manually Typed RuntimeConfig inside Layer causes TypeScript error in app using this layer. HOT 2
- Retry import / chunk / CSS loads for transient network errors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.js.