The webpage needs to work offline (whole point of the project) but should be able to work without js if need be.
I create templates server-side and serve them to the client,
If js is available, it takes over and renders any further client-side interactions.
Does this sound like poor design or a valid reason to be able to render on the server and client?
Webpages don't work offline. All the user has to do to break everything is hit "refresh". What your business users wanted was an app, and you gave them a webpage instead.
I also don't understand why you would do rendering both server and client side. That's an overcomplicated architecture that doesn't buy you anything. If you chose one, you'd have a simpler architecture.
And before you claim "optimization"--did you profile?
1. Hitting refresh doesn't break everything. It resets your current state to the default. I default to the url combined with locally stored state, so you will lose text in an input field, but not much else.
2. I want a website not an app, thank you very much. I'm really just displaying text. I don't need to download an app for that when I have a perfectly good browser on every device I'd like to read from.
3. Maybe it's over complicated to you, but the same function that renders on the server is what I use to render on the client. Zero difference. It's not a choice I have to make so I can use either when I feel it's appropriate.
Really?
1. Go to your website.
2. Disconnect from the internet.
3. Hit Ctrl+Shift+R.
How's that app you wrote as a website working for you?
It's called appcache. Works in most browsers. You should look it up ;)