aofei / air

An ideally refined web framework for Go.
https://pkg.go.dev/github.com/aofei/air
MIT License
440 stars 37 forks source link

AutoPush needs more control #20

Open SaulDoesCode opened 5 years ago

SaulDoesCode commented 5 years ago

the <link> tag has several variations which don't always need pushing for example with preload/favicon pushing can disturb caching and cause needless bandwidth consumption and sometimes in the worst cases duplicate requests, so there should be a bit more specificity and potentially a feature to exclude/omit certain paths from the push list, (immutable/async cached assets assets that are very big)

see transplacer's take on this matter.

aofei commented 5 years ago

Yeah, you are right. It seems that the AutoPush feature needs to be refined. I'll take the time to study it in a few days.

BTW, you made a mistake in the transplacer, I'm fixing it, you'll see.

aofei commented 5 years ago

Hi @SaulDoesCode,

See my new commit 7c0d0bb460c3421332f4875f27f5a0699e330ed7.

SaulDoesCode commented 5 years ago

Awesome, everyday something is getting better. 😄