Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Load An iFrame without having a history

Posted on 2004-04-15
8
Medium Priority
?
2,401 Views
Last Modified: 2012-05-04
Hi guys, I wonder if i can disable the page history in iFrames..

I have a Main.asp
in this page, there is a iFrame that calls another URL

When the iFrame loads another page (e.g. DeleteWorkSpace.asp),
it would save DeleteWorkSpace.asp into the history which i dun want it to happen.

Is there a solution?

-------------------------------------------------------------------------------------------------------------
Below is my IFrame :

<iframe name='contentFRM3' id='contentFRM3' width='0%' height='0%' frameborder='0' scrolling='no' frameSpacing='0'></iframe>
<div id='contentLayer3' style='position:absolute; width:345px; height:115px; z-index:1; left: 186px; top: 304px'></div>


And I use javascript to load an page into that iframe :

document.getElementById('contentFRM3').src = "deleteWS.asp"

---------------------------------------------------------------------------------------------------------------

How am i gonna write to disable the page history from being load?

I've used
<%
      response.Expires = -1
      response.Expiresabsolute = Now() - 2
      response.AddHeader "pragma","no-cache"
      response.AddHeader "cache-control","private"
      response.CacheControl = "no-cache"
%>
but its useless, its still stores the history.....

Hope u guys can help me, thanX.


0
Comment
Question by:FantasyEx
[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
8 Comments
 
LVL 63

Expert Comment

by:Zvonko
ID: 10831589
Did you try:

document.getElementById('contentFRM3').location = "deleteWS.asp"

0
 
LVL 5

Expert Comment

by:alambres
ID: 10832066
document.getElementById('contentFRM3').location.replace("deleteWS.asp");
0
 
LVL 5

Expert Comment

by:alambres
ID: 10832106
better :

<body onunload="document.getElementById('contentFRM3').location.replace('about:blank');">

location.replace(newURL)  does not add newURL to history just overwrite the previous, if you overwrite the current url for the iframe with another  it disappear from the navigation history
0
 
LVL 25

Accepted Solution

by:
devic earned 1000 total points
ID: 10836580
<%

   Response.CacheControl="no-cache"
   Response.AddHeader "Pragma","no-cache"
   Response.Expires=0

%>
for me this works fine.
0
 
LVL 3

Expert Comment

by:robotman757
ID: 10838428
I agree with devic. Plus it is all ASP which I think is better in this case...IMHO

Dan
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

715 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