sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Not Caching Code

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 2 Posters 215 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MartinRinehart
      last edited by

      To test in a certain browser (whose name must not be mentioned) I am constantly frustrated by the fact that my JS is cached and the only way to test a change is to reload the browser. Is there a way to say "reload, even the JS"?

      Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Ctrl+F5 doesn't work?

        IE is known to be very aggressive in caching. Had it been on a web-server you'd set a HTTP header for the JS document to no-cache. But since this is run locally I'm not sure.

        Maybe adding the no-cache META tag to the HTML will work? (I'm not sure if that will affect both the external documents or just the HTML document - I suspect the latter.)

        
        <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
        <META HTTP-EQUIV="Expires" CONTENT="-1">
        
        

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • M Offline
          MartinRinehart
          last edited by

          @thomthom said:

          Ctrl+F5 doesn't work?

          Thanks for your help, but Ctrl+F5 doesn't do it. Neither does the meta. Neither does the meta if you insert it before and after the body, per Joe Burns.

          However, one thing works! Do not load the HTML in the browser (tho that seems sensible if you want to test HTML). Use your model's Ruby code to load it in a WebDialog. Then your cycle is edit, load ruby, view changes.

          This works with script in the HTML or with script in a linked .js.

          In conclusion, Google (hello, Google? you there Google?) has chosen its browser without much wisdom. (That's more polite than my actual feelings.) The only better choice would be any other choice. PLEASE!

          Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            Meta tags only goes in the HEAD - as the very first tags.

            @martinrinehart said:

            The only better choice would be any other choice. PLEASE!

            Amen!

            When I'm writing plugins with webdialogs - when I only change the JS code (external) I think the only thing I did was to activate the webdialog and press F5 / Ctrl+F5...

            Maybe it's some local setting...

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • M Offline
              MartinRinehart
              last edited by

              @thomthom said:

              Meta tags only goes in the HEAD - as the very first tags.

              I agree, except:

              http://www.htmlgoodies.com/beyond/reference/article.php/3472881

              Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                That's a like a very hacky wacky workaround. And the site talks about IE5 and Navigator... a wee bit old resource.

                Thomas Thomassen — SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement