Hacker Newsnew | past | comments | ask | show | jobs | submit | iron4o's commentslogin

I've noticed that browser caching with Last-Modified and If-Modified-Since is not working on my projects where embed.FS and http.FileServer are used. Which is quite a lot of them.

I guess that my investigation and solution may be helpful to others.


Maybe wrapfs.WithModTime(... should not use time.Now() but get the mod time of the running binary?


Well, this is left to the application developer to decide and the library should not make the choice for them. In my own application it makes sense to use time.Now(), for example.


Wow! Even the website looks the same. With the vinyl in the background and everything ;D


I couldn't resist the play ;D


Why are there trees in them middle of the road? ;D


Alien trees...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: