mpapila / Project-Blog-API-Client-Side

0 stars 0 forks source link

Website crashes on page reload #1

Open Bongani001 opened 2 weeks ago

Bongani001 commented 2 weeks ago

When I navigate to other pages other than the homepage, the website crashes. To prevent this you can add a netlify.toml file at the root of your project and add the following content:

[[redirects]]
from="/*"
to="<base url of your website>"
status=200
mpapila commented 2 weeks ago

Hello Bongani001

Thank you for sharing this information. I’ve tested the website, and I’m not encountering any issues when navigating to pages other than the homepage. The site seems to work smoothly on my end.

However, if you're experiencing this problem, it could be related to the free tier of Glitch.com, where the site is hosted. Sometimes, apps hosted on Glitch's free plan can go to sleep or take longer to respond after being idle for a while, which might cause temporary crashes or delays when navigating between pages. I believe that this isn't an issue with the code or routing, but rather a limitation of the hosting environment.

If you see the issue persist, a page reload should fix it after the app has "woken up." Feel free to let me know if it continues, and I'll be happy to investigate further and thank you so much for bringing this to me.

Bongani001 commented 2 weeks ago

I'm sorry, I was not clear on the issue. When I navigate to other pages, everything is okay but when I refresh the page other than the homepage, it crashes. Here is a screenshot: Screenshot_20241014_233628_Chrome