timbo343 Posted March 25, 2020 Posted March 25, 2020 Since more users have been using HAP since the COVID19 issue, some have been reporting that when they upload a file back to the network and re-download it, the file they have downloaded doesn't contain the changes so it's like there is a caching issue in the browser. The browser that is in question is Chrome but it works as it should if IE11 is used.
timbo343 Posted March 26, 2020 Author Posted March 26, 2020 Further tests show that Edge Chromium is also affected but Firefox is fine.
3s-gtech Posted March 26, 2020 Posted March 26, 2020 Is it worth disabling caching for the site in IIS?
timbo343 Posted March 26, 2020 Author Posted March 26, 2020 would it be a case of following this guide > How to disable cache in IIS | Devin Baldwin but adding .aspx as that is what HAP is built on? @nickbro - are you able to offer any help here?
3s-gtech Posted March 26, 2020 Posted March 26, 2020 Yup, prevent all caching option. I don’t think HAP has too much other content to be too cache dependent, but keep an eye on performance. 1
timbo343 Posted March 26, 2020 Author Posted March 26, 2020 Will try tonight as i can imagine it will be in use all day today.
timbo343 Posted March 26, 2020 Author Posted March 26, 2020 Ok i've tried the caching option but rather than tell IIS to use .aspx i saw the EDIT FEATURE SETTINGS on the right under Output Cache This hasn't made a difference to Chrome or Edge Chromium. There must be a deeper issue with these 2 browsers as it does seem coincidental that they are built on the same platform. There is an announcement on the home page of the Home Access Plus home page informing users what browsers to use.
3s-gtech Posted March 26, 2020 Posted March 26, 2020 I suspect that the bug is those browsers may ignore the server-side do not cache flag. Have you tested by disabling the browser cache client-side? Obviously not ideal but will help in debugging.
timbo343 Posted March 26, 2020 Author Posted March 26, 2020 Yeap tried that too in Chrome and the issue still remains.
3s-gtech Posted March 26, 2020 Posted March 26, 2020 How frustrating. That’s a lot of users affected, as Firefox’s market share isn’t that high (though Safari will be a big percentage). I wonder whether there’s a possible code change in the site to force a refresh - depends on your prowess in ASPX on that one.
timbo343 Posted March 26, 2020 Author Posted March 26, 2020 How frustrating. That’s a lot of users affected, as Firefox’s market share isn’t that high (though Safari will be a big percentage). I wonder whether there’s a possible code change in the site to force a refresh - depends on your prowess in ASPX on that one. Errr, not a chance on that one.
nickbro Posted March 27, 2020 Posted March 27, 2020 Hi all, it'll be a caching issue, that will be baked into the code I think. Lets see if we can hack something into the javascript... Line 798 of /myfiles/default.aspx SelectedItems()[0].Data.Path.replace(/\\/g, "/") ---> (SelectedItems()[0].Data.Path.replace(/\\/g, "/") + '?' + Math.Random()) Same on 814 + 1432 Line 1032 + 1047 item.Data.Path.replace(/\\/g, "/") --> (item.Data.Path.replace(/\\/g, "/") + '?' + Math.Random()) 2
timbo343 Posted March 27, 2020 Author Posted March 27, 2020 Hi all, it'll be a caching issue, that will be baked into the code I think. Lets see if we can hack something into the javascript... Line 798 of /myfiles/default.aspx SelectedItems()[0].Data.Path.replace(/\\/g, "/") ---> (SelectedItems()[0].Data.Path.replace(/\\/g, "/") + '?' + Math.Random()) Same on 814 + 1432 Line 1032 + 1047 item.Data.Path.replace(/\\/g, "/") --> (item.Data.Path.replace(/\\/g, "/") + '?' + Math.Random()) Thanks Nick. Will try it over the weekend.
nickbro Posted March 27, 2020 Posted March 27, 2020 I can't test anymore as I don't work in a place that uses HAP+ anymore.
timbo343 Posted March 27, 2020 Author Posted March 27, 2020 Hi all, it'll be a caching issue, that will be baked into the code I think. Lets see if we can hack something into the javascript... Line 798 of /myfiles/default.aspx SelectedItems()[0].Data.Path.replace(/\\/g, "/") ---> (SelectedItems()[0].Data.Path.replace(/\\/g, "/") + '?' + Math.Random()) Same on 814 + 1432 Line 1032 + 1047 item.Data.Path.replace(/\\/g, "/") --> (item.Data.Path.replace(/\\/g, "/") + '?' + Math.Random()) @nickbro Before editing i wanted to check with you that the line numbers married up - I don't have a line 1432. Please check the images to see if they are correct
nickbro Posted March 27, 2020 Posted March 27, 2020 Search for the original and replace Should be near a download warning
timbo343 Posted March 27, 2020 Author Posted March 27, 2020 Ok, i've done a search and found the following - a few more than just on 3 lines. SelectedItems()[0].Data.Path.replace: Line 170 Line 710 Line 736 Line 774 Line 807 Line 830 item.Data.Path.replace Line 870 Line 871
timbo343 Posted March 27, 2020 Author Posted March 27, 2020 870 should be it Thanks, so OLD: if (item.Data.Type != 'Directory') window.open((item.Data.Path.match(/\.\./i) ? item.Data.Path.replace(/\\/g, "/") : '#' + item.Data.Path)); NEW: if (item.Data.Type != 'Directory') window.open((item.Data.Path.match(/\.\./i) ? [b](item.Data.Path.replace(/\\/g, "/") + '?' + Math.Random())[/b] : '#' + item.Data.Path)); What about the other one i need to change?
timbo343 Posted April 1, 2020 Author Posted April 1, 2020 Thanks, so OLD: if (item.Data.Type != 'Directory') window.open((item.Data.Path.match(/\.\./i) ? item.Data.Path.replace(/\\/g, "/") : '#' + item.Data.Path)); NEW: if (item.Data.Type != 'Directory') window.open((item.Data.Path.match(/\.\./i) ? [b](item.Data.Path.replace(/\\/g, "/") + '?' + Math.Random())[/b] : '#' + item.Data.Path)); What about the other one i need to change? @nickbro editing only line 870 didn't work - in fact it made the site not render correctly.
timbo343 Posted April 1, 2020 Author Posted April 1, 2020 Is it giving any errors? @nickbro No - it shows the following: I edited line as instructed to -
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now