Skip to content
This repository was archived by the owner on Nov 12, 2020. It is now read-only.
This repository was archived by the owner on Nov 12, 2020. It is now read-only.

Cache-control causes broken image links when initial request after upload fails #324

@aforcier

Description

@aforcier

Original ref: wordpress-mobile/WordPress-Android#3896 (comment)

After uploading an image, when cache control is enabled on the server AND the initial image loading fails at least once, the original image URL is cached as a broken image. Once the ?retry= part is removed from the image.src, the broken image will show up. This will happen if the user switches to HTML mode, closes and reopens the post (as draft), or uploads the post and re-opens it on the same device.

Some options involve clearing the cache (will clear the cache for all WebViews throughout the app), using an iframe hack to force the cache to be updated (a quick attempt to do this was unsuccessful but it's still a possibility), or using ?attempt= suffixes from the initial loading attempt, and only using the real url after it's confirmed to exist (affects all users and possibly introduces other bugs, to fix the issue for a small number of users who would run into it).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions