Solved

use javascript to enter ctrl-shift refresh for inframe page

Posted on 2009-07-11
4
224 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
Suggested Courses

751 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