Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2423
  • Last Modified:

Load An iFrame without having a history

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
FantasyEx
Asked:
FantasyEx
1 Solution
 
ZvonkoSystems architectCommented:
Did you try:

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

0
 
alambresCommented:
document.getElementById('contentFRM3').location.replace("deleteWS.asp");
0
 
alambresCommented:
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
 
devicCommented:
<%

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

%>
for me this works fine.
0
 
robotman757Commented:
I agree with devic. Plus it is all ASP which I think is better in this case...IMHO

Dan
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now