Solved

Remove page from browser page log

Posted on 2011-02-17
11
186 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
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 

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:Arno Koster
Arno Koster 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

738 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