0
0
Astroframework~5 mins

Why data fetching happens at build time in Astro - Quick Recap

Choose your learning style9 modes available
Recall & Review
beginner
What does 'data fetching at build time' mean in Astro?
It means Astro gets the data needed for your site while it is being built, before anyone visits the site. This helps make pages load faster because the data is already there.
Click to reveal answer
beginner
Why is fetching data at build time better for performance?
Because the data is included in the static files, the site loads quickly without waiting for data to load from a server when a user visits.
Click to reveal answer
beginner
How does build time data fetching improve user experience?
Users see the page content immediately since the data is already loaded, making the site feel faster and smoother.
Click to reveal answer
intermediate
What is a limitation of fetching data at build time?
The data is fixed when the site is built, so it won't update until you rebuild the site again.
Click to reveal answer
beginner
Give an example of when to use data fetching at build time in Astro.
Use it for blog posts or product pages where content changes rarely, so pages load fast and don’t need live updates.
Click to reveal answer
What is the main benefit of fetching data at build time in Astro?
AData updates in real-time without rebuilding
BPages load faster because data is preloaded
CIt reduces the size of the website
DIt allows users to edit data on the site
When does Astro fetch data if using build time fetching?
AWhen the site is built before deployment
BEvery time a user visits the page
COnly when the user clicks a button
DWhen the server restarts
What happens if data changes after build time in Astro static sites?
AThe site shows old data until rebuilt
BThe site updates automatically
CThe site crashes
DUsers can refresh to get new data
Which type of content is best suited for build time data fetching?
AUser profiles updated frequently
BLive chat messages
CContent that changes rarely
DReal-time stock prices
How does build time data fetching affect server load?
ARequires a dedicated server
BIncreases server load constantly
CHas no effect on server load
DReduces server load during user visits
Explain why Astro fetches data at build time and how it benefits website speed.
Think about when the data is ready and how that affects loading.
You got /4 concepts.
    Describe a scenario where fetching data at build time is not ideal and why.
    Consider content that needs to be fresh all the time.
    You got /4 concepts.