• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Remove page from browser page log

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
IVerE
Asked:
IVerE
  • 6
  • 4
3 Solutions
 
Maximus5684Commented:
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
 
IVerEAuthor Commented:
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
 
Maximus5684Commented:
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Maximus5684Commented:
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
 
IVerEAuthor Commented:
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
 
IVerEAuthor Commented:
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
 
IVerEAuthor Commented:
And the Visio web stays untouched.
0
 
Maximus5684Commented:
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
 
Arno KosterCommented:
you could try this :

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

0
 
IVerEAuthor Commented:
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
 
IVerEAuthor Commented:
Not exactly what I was asking and hoping for, but a workable solution. Thanks!
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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