When web-apps are implemented in scripting languages which suffer from poor
performance,
it is common practice to proxy them behind a "real" web server such as
nginx, and offload SSL
termination, caching, handling of static components, etc to it.
In Go http.ListenAndServe is an industrial strengt
> Sorry I don't quite understand -- my go application IS my webserver.
>
This is a topic that has confused me in the past. In the simple case where
you build a Go executable and get requests from it directly, your Go
application *is* your web server. However, it's common in industry to put a
syste
Thanks a lot Tamás! That's very clear & helpful!
On Sun, May 19, 2019 at 10:54 AM Tamás Gulácsi wrote:
>
> ETag and Last-Modified are just to allow the browser to decide with a HEAD
> request, whether GET the whole resource.
--
You received this message because you are subscribed to the Google
No what I have said is the enterprise or standard way of doing it.the
functionality you are looking for is not specific to any programming
language. It is with the http headrers which is standard across all
platforms.
But if you really want to do in your app you need to cache-control header
in your
Hi Tong,
You can use a webserver between browser and your go application which will
take care of header modification for browser caching.
Thanks and regards,
Satyendra
On Sun, 19 May, 2019, 7:26 PM Tong Sun, wrote:
> Hi,
>
> How to have http.Handle / http.HandleFunc to produce static content th
ETag and Last-Modified are just to allow the browser to decide with a HEAD
request, whether GET the whole resource.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
Yust set the headers you want, with w.Header().Set, before any Write.
For example Set("Cache-Control", "public, max-age=31536000")
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, s
Sorry I don't quite understand -- my go application IS my webserver.
Are you saying Go net/http is not capable of doing what I'm asking?
On Sun, May 19, 2019 at 9:59 AM satyendra singh
wrote:
>
> Hi Tong,
> You can use a webserver between browser and your go application which will
> take care o
Hi,
How to have http.Handle / http.HandleFunc to produce static content that
browser will use their caches without downloading every time?
For a simplest http.HandleFunc, like the following,
func sayHello(w http.ResponseWriter, r *http.Request) {
message := "Hello "
w.Write([]byte(mes