Tuesday, June 25, 2024
HomeGolangHow does browser caching presently work? - Getting Assist

How does browser caching presently work? – Getting Assist


There are information in my web site (.css, .js, .html) which can be going to alter continuously however on the similar time there are a lot of others (with the identical extensions talked about above) that may all the time be static so I wish to inform the browser which information it’s allowed to cache. How do I do it utilizing Go?

Alternatively, I learn that browsers all the time cache .html information, if that’s true, how the hell are dynamic web sites going to work? that might drive to make use of loads of javascript and wouldn’t enable the usage of methods comparable to templates. It’s value mentioning that I learn such info in outdated posts and I couldn’t discover present info, however my intuition tells me that presently any browser caches .html information, am I proper?

Static pages are rendered as they’re by Go.
Static pages with dynamic information the place the info is handed to the template to {{.}} and rendered by Go.
Totally dynamic pages is often constructed by Javascript and rendered by the browser.

And there are pages rendered in Go and components of the content material is up to date utilizing Javascript and innerHTML.

That’s how I interpret it. However the time period “dynamic” is floating.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments