Solved

use javascript to enter ctrl-shift refresh for inframe page

Posted on 2009-07-11
4
221 Views
Last Modified: 2012-08-13
I am having the nasty IE unwanted caching of javascript, and had to use ctrl-shift refresh to refresh some js on a page.

worse yet, it is an iframe page, so I had to use refresh in the context menu,

anyone know of a way to do this with javascript instead?
0
Comment
Question by:bhomass
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
Xemorph earned 250 total points
ID: 24833479
You can append a random string onto the javascript file.  For example, append the current timestamp...

<script src="scripts/script.js?34325234534" type="text/javascript" ></script>

To try to get IE to reload it everytime
0
 
LVL 15

Expert Comment

by:fsze88
ID: 24834294
you can try add
<meta http-equiv="Pragma" content="no-cache">
between <head></head> tag
0
 

Author Comment

by:bhomass
ID: 24836518
I already tried the whole set of header settings

            resp.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
            resp.setHeader("Pragma","no-cache"); //HTTP 1.0
            resp.setDateHeader("Expires", 0); //prevents caching at the proxy server

none worked. not a surprise. this non-response has been reported by others.

if no other shows up, it will have to be the uniquer url approach with random number on the tail.
0
 
LVL 4

Expert Comment

by:Xemorph
ID: 24911721
Did the random string help you?
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question