forcing Explorer not to cache javascript code.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kaston3

    forcing Explorer not to cache javascript code.

    I use screen.width to check escreen resolution and then document.write
    to write different width tables accordingly. It all works OK with
    Mozilla Firefox, however it seems that in IExplorer it only works when
    I reload the page. I think it can be cache handling in IE.

    I tried putting the javascript code in an extrenal js.file. Then i
    tried calling that file with a random number (using time functions) eg.
    mycode.js?nn=se condss; but it doesn't work either.

    The page is rather heavy so I am only interested in the javascript not
    being cached.

    Is there a solution for this?
    Thanks

  • Randy Webb

    #2
    Re: forcing Explorer not to cache javascript code.

    kaston3 said the following on 7/14/2006 5:46 PM:
    I use screen.width to check escreen resolution and then document.write
    to write different width tables accordingly.
    I'm sorry. Why are you using unreliable antiquated methods to create
    your pages?

    <URL: http://allmyfaqs.net/faq.pl?AnySizeD esign>
    It all works OK with Mozilla Firefox, however it seems that in
    IExplorer it only works when I reload the page. I think it can
    be cache handling in IE.
    It's possible, but highly unlikely.
    I tried putting the javascript code in an extrenal js.file. Then i
    tried calling that file with a random number (using time functions) eg.
    mycode.js?nn=se condss; but it doesn't work either.
    What does "doesn't work" mean?
    The page is rather heavy so I am only interested in the javascript not
    being cached.
    >
    Is there a solution for this?
    Maybe, depending on what the problem is.

    Why doesn't my dishwasher work? No, you can't see it, just guess and
    tell me what's wrong with it.

    Post a URL to a sample page that shows the behavior.

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
    Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

    Comment

    • kaston3

      #3
      Re: forcing Explorer not to cache javascript code.


      Yes, You are right about the dishwasher that you can't see to repair.
      Sorry :-)



      The problem is with the background image (light blue color is actually
      an image) on the left and the flash slideshow on the right.

      When you first load the page it seems there's no problem aside from
      some error (object not found), no related to the tables.

      But when you load it again or at random times the cells for image
      (left) and flash (right) are not displayed correctly being displaced
      further left and right respectively and leaving a space in the middle.

      This problem doesn't happen with Firefox.


      Thanks.

      Comment

      • kaston3

        #4
        Re: forcing Explorer not to cache javascript code.


        Ok, to reproduce the problem.

        Go to www.educationprojects.net/index9.php

        Everything seems ok but now put the mouse cursor in the bowser url box
        and press enter to load the page again. The cells are displaced to the
        sides leaving a space in the middle.


        I use IE 7 beta but the same occurs in IE 6

        Thanks.

        Comment

        Working...