Solved

Remove page from browser page log

Posted on 2011-02-17
11
183 Views
Last Modified: 2012-05-11
Hi!

I have a VB program that builds HTML pages with links to PDF files. This system, prior to building the file, checks whether there are several versions of the PDF files. If there is only one version, the built HTML page contains a <META http-equiv=refresh> statement which automatically redirects the browser to the relevant .PDF file. If the program finds two or more versions, the HTML file is built as a menu and the user can select the relevant version of the document. This works fine. The problem arise when the user wants to go back to the calling page and hits the 'Previous page'-button in the browser. In cases where there is only one version the user is brought  back to the HTML page with the <meta>-tag and is immediately redirected to the PDF. Even clicking the backwards-button quickly twice doesn't help. Is there an elegant solution to this that I can implement?

Thanks!
0
Comment
Question by:IVerE
  • 6
  • 4
11 Comments
 
LVL 3

Expert Comment

by:Maximus5684
ID: 34916625
What page are you expecting them to be able to go back to? From what you've described it seems the only purpose of the redirection page is just that - to redirect. Why would they want to visit that page again?
0
 

Author Comment

by:IVerE
ID: 34916691
Well, this is the situation:

I have created a system for information flow between a lot of data systems in MS VIsio. This is converted to web-pages and all the boxes in the Visio-pages are hyperlinked to sub-HTML-pages. THese are the pages I told about in my previous message. So when you have several .pdf versions a page-backwards should take the user to the HTML file with the versions list and if there is only one version of a pdf, the user should be taken back to the calling Visio HTML page. The number of links, pdf dokuments and HTML files are quite large, and to not have to manually update all these links every time someone makes a change or adds a new pdf-file version, I have made a VB program that searches through all the .pdf files and builds all the HTML files that lays between the Visio web and the pdf files. You see?

IVer
0
 
LVL 3

Expert Comment

by:Maximus5684
ID: 34916711
I think I understand now. There are pages previous to the "refresh page" that you'd like them to be able to get back to. Well, I'd need to know how the page prior to the "refresh page" is generated to be able to help with that part. Is it a page that is generated on-the-fly by the VB application, a static HTML page, or written in a server-side language (PHP, .NET, ASP, etc...). Also, in most browsers you can either hold down the back button or click a drop-down arrow next to the navigation buttons to get a list of all previously visited pages where you can just click on the 2nd entry down to go back 2 pages without visiting the intermediate page.
0
 
LVL 3

Expert Comment

by:Maximus5684
ID: 34916753
Outside of using the navigation as I suggest above, I would say just have your VB program not generate the refresh page and just serve the PDF to the user directly. However, that's something you'll have to handle in a VB forum.
0
 

Author Comment

by:IVerE
ID: 34916776
The "calling" HTML pages are generated from MS Visio and is nothing we can infuence. These are quite static btw. Since many different people with different level of computer knowledge is going to use this documentation system I'm keen on making it so straight forward to use as possible. I was hoping to e.g. use JS and document.location or something like that to go to the .pdfs and then as part of that script remove the previous browser log entry so that the next time the user clicks the back button he or she is brought to the Visio HTML page.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:IVerE
ID: 34916814
I see what you mean, but the point is that I need to go via one of my own generated web-pages to avoid having to update the Visio file and manually re-generate the entire Visio-website every time a .pdf file version is added. The way it works now all I need to do is to call my VB program and the file indexes are regenerted and link pages rebuilt within seconds.
0
 

Author Comment

by:IVerE
ID: 34916822
And the Visio web stays untouched.
0
 
LVL 3

Assisted Solution

by:Maximus5684
Maximus5684 earned 63 total points
ID: 34916845
Then my suggestion is to set the meta tag to refresh after a period of seconds instead of immediately, like so:

<meta http-equiv="refresh" content="2;url=http://www.mysite.com/something.pdf">

Open in new window


This would wait 2 seconds before redirecting to the new page which would allow the user to click back through the page with enough time before it redirects again.
0
 
LVL 19

Assisted Solution

by:akoster
akoster earned 62 total points
ID: 34917469
you could try this :

<A HREF="javascript:history.go(-2)">Click here to go two pages back</A>

0
 

Accepted Solution

by:
IVerE earned 0 total points
ID: 34917585
Well, or I could open the ,pdf in a new window and send the calling page back to the Visio file, so when they close the .PDF they're back. I think I'd rather go for that.
But thanks anyway!
Brgds
IVer in Oslo, Norway
0
 

Author Closing Comment

by:IVerE
ID: 34949703
Not exactly what I was asking and hoping for, but a workable solution. Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

896 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now