Announcement

Collapse
No announcement yet.

HTTP() and caching

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTP() and caching

    I've noticed that in using the HTTP() function I have a problem that my system (browser?) is caching the internet file that I'm retrieving with this function and as such old data is often returned and not the new data that's been loaded o
    into that space on the net.

    Has anybody else encountered that? Is there a was of forcing HTTP() to do a refresh of that link before it retrieves it?

    Thanks
    Standing on the shoulders of giants.

  • #2
    Hello wildfiction,

    There isn't a way to force a refresh from the EFS. This problem may be related to your browser settings. If you're using IE, go to Tools-->Options and select Settings under Temporary Internet files. Check your setting that controls how your browser checks for new versions of stored files. Let me know if that helps.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Hi Jason,

      I'm using both IE and Firefox but I understand what you're saying. Problem is that other people using the indicator may have caching switched on and it will affect them as well.

      It's difficult to keep track of the users of your EFS' settings on their browsers. It's okay for me because I can spot if the numbers haven't updated and refresh via the browsers but other users aren't going to understand or notice that...
      Standing on the shoulders of giants.

      Comment


      • #4
        Hello wildfiction,

        Are you saying that changing that browser setting fixed the problem? I just want to confirm that because if that is the case then I can forward some more specific info to development to see if we have any control over this behavior through EFS.
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment


        • #5
          Sorry Jason, I should have been more specific. I know that it's Firefox that's caching the file but I haven't been able to work out how to disable caching in Firefox yet...

          I will try and investigate this more over the weekend and post more info here for you.

          I know that if I load in Firefox it will show the old file because it has it cached. If I then refresh the file it updates the numbers and if I then reload the EFS in an Advanced Chart it comes up with the right numbers and that's how I originally tied the two together.

          Until I refresh the file using Firefox I don't get the right numbers in the EFS.
          Standing on the shoulders of giants.

          Comment


          • #6
            Okay I have some more info on this:

            I loaded the indicator today and it was showing yesterday's numbers as I expected because the file is being cached somewhere locally.

            I then loaded FireFox and selected the "Clear Cache" option to purge all files from the cache and tried to reload the EFS but it was still picking up yesterday's numbers.

            I then loaded the file into a page on the FireFox and it showed yesterday's numbers. I hit refresh and it loaded the new numbers from the web and then the EFS started picking up the new numbers.

            So it appears that caching of a file from the web is a problem for the HTTP() function. Is there any other function that will fetch the data directly from the web without going through a cache?

            Thanks
            Standing on the shoulders of giants.

            Comment


            • #7
              Hi guys.

              Actually the HTTP commands in EFS go through Windows, which probably uses the same caching mechanism as Internet Explorer.

              Right now it is set to NOT cache any data returned from the HTTP object. However, I can add a flag for the next version (7.9) that will also force the download of the data from the network rather than looking up in the cache first. The combination of both of these should fix your problem.

              (In the mean time, fire up Internet Explorer and empty its cache out, and see if that fixes things temporarily).

              It is not feasible to use the internet commands in Firefox yet (as much as I'd like to), as the internal Windows ones are easier for us for version control, compatibility, etc..

              Comment


              • #8
                Thanks for your comments Dion. I think that flag would be useful. I'll try emptying IE and FireFox caches and will retry tomorrow and see how it works.
                Standing on the shoulders of giants.

                Comment


                • #9
                  Further info and steps taken:
                  1. On evening of 25 Jan I emptied the cache from FireFox and IE and shut down computer.
                  2. On morning of 26 Jan I updated the data file to the internet.
                  3. I started eSignal and loaded the EFS that references the file on the internet but it was still coming up with the previous day's values.
                  4. I opened FireFox and refreshed that data file and then reloaded the EFS and the new numbers were then loaded.

                  My conclusion (and I don't know if this conclusion is correct) is that the web file is still being cached somewhere on my local machine and the HTTP() function is picking up that cached file. I think Dion was alluding to the fact that the HTTP() function goes through Windows and that perhaps the OS (?) or some layer of the OS is caching this information.

                  It also appears that I am the only person suffering from this problem and non of the other users of this EFS of mine are suffering the same problem. The other users of this EFS would not have loaded the data file from the internet into a browser because they would not know the URL of the data file as it is enclosed in the EFS which is encrypted. This would further indicate to me that the caching problem has been caused by loading it once by a broswer (in this case FireFox) and I seem unable to purge this cache.
                  Standing on the shoulders of giants.

                  Comment

                  Working...
                  X