サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
衆院選
www.sanarias.com
When you are building a web app, you want to make sure that you are caching the app's resources. So if for example a specific URL always delivers the same image, you want to cache it in the browser to avoid unnecessary traffic and have a better web performance. For the rest of this post I suppose you have the following web application. It generates an image when the /black/ URL is called. I would
At Golang Uk I learned from Andrew Gerrand's talk that you can define a type inside a function. I was curious if doing this would impact the performance of the code. Later the same day I asked the guy that sat next to me that same question. Turns out that guy was Alan Donovan who is one of the authors of go oracle. Alan told me: Both codes compile to the same assembly code so it doesn't matter if
I have written some posts on building images in an HTTP response and how to cache them. This post is about how to test all of this and verify that you are testing the right thing. This is the code that we are starting with: func blackHandler(w http.ResponseWriter, r *http.Request) { key := "black" e := `"` + key + `"` w.Header().Set("Etag", e) w.Header().Set("Cache-Control", "max-age=2592000") //
このページを最初にブックマークしてみませんか?
『www.sanarias.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く