Image OnLoad Technique failing to get current file.

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
During pilot testing a few months ago, I deployed an incorrect version of a file to the App Pages. I promptly fixed it but most of my users are still stuck with that bad file.

I tried to include a random value in the Formula Text used to get the js file and then noticed there are now two random values in the page request - I assume QuickBase includes one as well. I have changed the name of the file and reference to it to use versioning. Neither of these options helped.


Short of trying to get all my users to clear their entire browser caches, how can I get the correct data to load for them?


-----


I loaded a file into the App Pages with bad data producing an incorrect output (I'll call it v0). I have a process that gets the data from QuickBase and processes claims information but my team has had to go back and reprocess all of it because the invalid data. While I did quickly notice the error and fix it (v1), most of my users are stuck with the v0 file.


I tried to include a random value in the Formula Text used to get the js file to bypass caching and then noticed there are now two random values in the page request - I assume QuickBase includes one as well.


"<img id=\"hostImage\" src=\"/i/clear2x2.gif\" " & "onload=\"javascript:void($.getScript('" & URLRoot() & "db/" &Dbid() & "?a=dbpage&pagename=functions.js&rand='+Math.random()))\">"


This produces the output below for the page request.


GET /db/<DBID>?a=dbpage&pagename=functions.js&rand=0.02112747018104133&_=1478539329150


I have changed the name of the file and reference to it to use versioning.


"<img id=\"hostImage\" src=\"/i/clear2x2.gif\" " & "onload=\"javascript:void($.getScript('" & URLRoot() & "db/" &Dbid() & "?a=dbpage&pagename=functions_v1.js&rand='+Math.random()))\">"




Unfornutately, most of my users are still working with v0 and I am unable to determine why.
Photo of Scott

Scott

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,204 Points 20k badge 2x thumb
I can't make any sense out of what you are saying. To debug post the URL that is being fetched. You can use the Network tab of the Web Developer tools to see all network requests.