Solved

controlling browser's history/back button/cache

Posted on 1997-06-27
8
392 Views
Last Modified: 2013-12-25
I have a CGI application. Suppose the URL for that is:http://myserver/cgi-bin/foo.exe?ID=1I put this as a link in my startup page. SO when a user clicks this link, I generate a page which is returned back to the user. Now I want the following to happen:The URL shown to the user should be http://myserver/cgi-bin/foo.exe
  (no ID is to be shown)Now the page that I generated has another link to:http://myserver/cgi-bin/foo.exe?ID=2On clicking this link, I generate another page. Again I would like to display the URL to the user as:http://myserver/cgi-bin/foo.exe (again no ID is shown)And also if the user uses the 'BACK' button to go back to the previous page, he/she should not be able to go back tothe earlier page generated. The user should get back to the startup page.So basically what I want to do is havd a startup page. From there on I would generate pages, each of which will have next and previous links to go back and forward. But if the user uses teh browser's 'BACK' button, the user should go straight back to the startup page.
I would appreciate if someone can provide me with the html tags i would need to generate from my CGI script for this to happen.thanks.
0
Comment
Question by:vmanocha
[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
  • 4
  • 4
8 Comments
 
LVL 8

Accepted Solution

by:
mrmick earned 100 total points
ID: 1828603
You've asked several questions here.

In response to how you can show the user something different then what is referenced in a link:
<A HREF="http://WhatTheyGet_URL">WhatTheySee</A>

Your connected clients will always be able to view the source.  
The equivalent using your above references:

 <A HREF="http://myserver/cgi-bin/foo.exe?ID=1">http://myserver/cgi-bin/foo.exe</A>

mrmick
0
 
LVL 1

Author Comment

by:vmanocha
ID: 1828604
This is not what i am looking for. Let me clarify my question.Let's say i have the following link in the start page:<A HREF="http://myserver/cgi-bin/foo.exe?ID=1">CGIPage</A>So when the user clicks on CGIPage, foo.exe gets executed and it generates a page which is then displayed back to the user. Now in the browser window, there is an Address field which will display:http://myserver/cgi-bin/foo.exe?ID=1Instead of the above, can i make it display:http://myserver/cgi-bin/foo.exe---And yes, i have many questions here, but i feel that they are all related. anyway, i am increasing the points for this question from 50 to 100 !!!
0
 
LVL 1

Author Comment

by:vmanocha
ID: 1828605
This is not what i am looking for. Let me clarify my question.Let's say i have the following link in the start page:<A HREF="http://myserver/cgi-bin/foo.exe?ID=1">CGIPage</A>So when the user clicks on CGIPage, foo.exe gets executed and it generates a page which is then displayed back to the user. Now in the browser window, there is an Address field which will display:http://myserver/cgi-bin/foo.exe?ID=1Instead of the above, can i make it display:http://myserver/cgi-bin/foo.exe---And yes, i have many questions here, but i feel that they are all related. anyway, i am increasing the points for this question from 50 to 100 !!!
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 8

Expert Comment

by:mrmick
ID: 1828606
I see. (said the blind man)

I don't think what you want is possible through the use of an anchor tag, however I think you can get exactly what you want using a form tag, for example:

<FORM ACTION="http://myserver/cgi-bin/foo.exe" METHOD="POST"> (do not use the GET method here as it would produce the same affect you're trying to avoid)

Inside the form use a submit button, for example:

<INPUT TYPE="SUBMIT" NAME="ID1" VALUE="Opt1_ButtonCaption">
<INPUT TYPE="SUBMIT" NAME="ID2" VALUE="Opt2_ButtonCaption">

</FORM> (close the form tag)

This may be the answer to both your questions because the displayed URL is the URL as it appears in the ACTION reference above.  So, "backs" clicked to the same URL will produce no change (or skip to the last different URL)

Hope this helps, mrmick

0
 
LVL 1

Author Comment

by:vmanocha
ID: 1828607
i am not sure whether i can use a FORM. actually i am using images as links. when i use the type="submit", it will create a button. is there any way to use image instead ?
0
 
LVL 8

Expert Comment

by:mrmick
ID: 1828608
I don't think so using straight HTML.  Perhaps an Active X component would do the trick, although I stick to straight html and server side scripting only because I like my stuff to work with any browser.

Good luck, mrmick
0
 
LVL 1

Author Comment

by:vmanocha
ID: 1828609
thanks for your help. i was able to achieve what i wanted, usingthe combination of what you had suggested and JavaScript.
0
 
LVL 8

Expert Comment

by:mrmick
ID: 1828610
Great!  what's the url so I can check out what your doing?

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

729 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