Skip to content

Mitigate browser caching #986

Closed
Closed

Description

@duncangreene

What is the problem your feature is trying to solve?
The below video shows a browser cache issue that I've encountered from time to time. A browser refresh naturally resolves it, but it is confusing to the user.

cd102aa4-4359-4f3e-8766-1434e7b4a0f31-video-cutter.mp4

Describe the solution you think would solve the problem
Relevant cache control response headers sent by the Testrun web server to prevent/mitigate.

Additional context
Chrome 131.0.6778.85

Activity

  1. jboddey commented on Nov 22, 2024

    @jboddey
    Contributor

    Not sure I'm following. What is it that is being cached?

  2. duncangreene commented on Nov 22, 2024

    @duncangreene
    Author

    I've had it a couple of times where I seem to end up with the UI appearing as it does in the video, with no devices, reports, or adapters configured (despite it clearly showing in the Testrun logs that there are devices etc. configured). The version number also appears as below which is probably the most apparent manifestation.

    Image

    A refresh remedies it, so it may be more of a quirk browser-side as opposed to Testrun side maybe, but thought worth raising just in case. I'm a bit out of touch with modern day browser cache control so a bit unsure exactly where the problem is creeping in. 😅

  3. jhughesoti commented on Nov 25, 2024

    @jhughesoti
    Contributor

    From what it looked like (correct me if I'm wrong), you were connected to Testrun and shut it down and then restarted it but the browser remained "connected".

    The methods used are on-demand calls to the API and so worked as expected but the initial load of information, which only happens once on connection for efficiency because there's no point to keep reporting the version, formatting styles, device lists, etc. I'm not sure this is an issue but just an expected behavior for properly reconnecting to a Testrun instance that has been restarted.

  4. duncangreene commented on Nov 27, 2024

    @duncangreene
    Author

    From what it looked like (correct me if I'm wrong), you were connected to Testrun and shut it down and then restarted it but the browser remained "connected".

    Can't confirm the steps 100%, but I think when this has happened in the past it's where Testrun has stopped running but it wasn't 'gracefully' stopped via the web browser. E.g. process stopped.

    I notice the "Testrun is not responding. Please try again in a moment." dialogue detects unavailability perfectly. By way of a suggestion, instead of having the UI remain responsive (you can open Settings, Add Device etc. as shown in the below), could you have the whole interface greyed out/disabled to make it more apparent?

    c4b65652-e1e7-424b-9ea1-07b2ce934c9d.mp4
  5. added
    ui
    on Nov 29, 2024
  6. jboddey commented on Jan 15, 2025

    @jboddey
    Contributor

    In order to fix this, we would have to add a periodic check on the UI to determine whether the API has gone down and up again (then refresh endpoints). I think it is reasonable to expect users to refresh the page manually. It may be a worthwhile idea to change the 'API not responding' message to tell the user to refresh?

  7. duncangreene commented on Jan 15, 2025

    @duncangreene
    Author

    @jboddey, agreed, a refresh prompt would be beneficial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions