Skip to content

Reduce client side loading in layout.tsx (and update dependencies)#5

Open
ranidspace wants to merge 2 commits into
Ryubing:mainfrom
ranidspace:staticfix
Open

Reduce client side loading in layout.tsx (and update dependencies)#5
ranidspace wants to merge 2 commits into
Ryubing:mainfrom
ranidspace:staticfix

Conversation

@ranidspace
Copy link
Copy Markdown
Contributor

This PR is an attempt to address the rate limiting from cloudflare, though I didn't get very far.

Dependencies were updated, some older dependency may have been causing issues, but I can't say. ("@types/cookie" was deprecated and no longer needed)

In layout.tsx the child content is wrapped in a "RouteGuard" which does some server side checks on if routes exist, and if the site requires a password and if the user is authenticated. Currently none of the pages require any of these checks.

Since these checks are performed server side, and the client then needs to render the page with javascript, this causes more requests to be done for every page. With the RouteGuard removed it's able to, for the most part, render the pages statically, and perhaps reduce traffic a bit.

There's more ways to reduce traffic however I feel a lot of it comes from dependencies which can't be changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant