Solved

Remove page from browser page log

Posted on 2011-02-17
11
182 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

PDF files have been in the limelight due to its unmatched features.  Personal documents, emails, business reports and eBooks are all converted into PDF files owing to peerless features provided by it. Adding watermark to a PDF file is a method to se…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

760 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

18 Experts available now in Live!

Get 1:1 Help Now