?
Solved

Remove page from browser page log

Posted on 2011-02-17
11
Medium Priority
?
188 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
WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

 
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 252 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 248 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

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!

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
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.

800 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