3 ms·
> One of the nice things about SPAs is that they allow navigation without the latency needed to re-load all assets. [...] You can get there the old-fashioned wa
by ptx 3y ago
> One of the nice things about SPAs is that they allow navigation without the latency needed to re-load all assets. [...] You can get there the old-fashioned way if [...] you're doing something like putting hashes in the asset URL and hashing them as part of your build process.
But that solves the problem, doesn't it? And it seems a lot simpler than implementing an SPA.
Django has this feature built-in. You just have to enable ManifestStaticFilesStorage:
https://docs.djangoproject.com/en/4.2/ref/contrib/staticfiles/#django.contrib.staticfiles.storage.ManifestStaticFilesStorage https://docs.djangoproject.com/en/4.2/ref/contrib/staticfile...
- gwbas1c 3y ago> And it seems a lot simpler than implementing an SPA Depends on your design goals. BTW, I'm not pro/against SPAs. It's just a tool, and like all tools, they have their advantages and disadvantages. In general, the fact that you can update the page without a server-side round trip is a major advantage. Granted, you can also do that with server-side rendering; but then your rendering logic is defined in two places.