mirror of
https://github.com/makew0rld/amfora.git
synced 2024-12-04 14:46:29 -05:00
✨ Disable cache for redirects - fixes #114
This commit is contained in:
parent
277cc91881
commit
b05885e710
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- The web browser code doesn't check for Xorg anymore, just display variables (#93)
|
||||
- Bookmarks can be made to non-gemini URLs (#94)
|
||||
- Remove pointless directory fallbacks (#101)
|
||||
- Don't load page from cache when redirected to it (#114)
|
||||
|
||||
### Fixed
|
||||
- XDG user dir file is parsed instead of looking for XDG env vars (#97, #100)
|
||||
|
@ -383,11 +383,14 @@ func handleURL(t *tab, u string, numRedirects int) (string, bool) {
|
||||
|
||||
// Gemini URL, or one with a Gemini proxy available
|
||||
|
||||
// Load page from cache if possible
|
||||
page, ok := cache.GetPage(u)
|
||||
if ok {
|
||||
setPage(t, page)
|
||||
return ret(u, true)
|
||||
// Load page from cache if it exists,
|
||||
// and this isn't a page that was redirected to by the server (indicates dynamic content)
|
||||
if numRedirects == 0 {
|
||||
page, ok := cache.GetPage(u)
|
||||
if ok {
|
||||
setPage(t, page)
|
||||
return ret(u, true)
|
||||
}
|
||||
}
|
||||
// Otherwise download it
|
||||
bottomBar.SetText("Loading...")
|
||||
|
Loading…
Reference in New Issue
Block a user