Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

controlling browser's history/back button/cache

Posted on 1997-06-27
8
Medium Priority
?
395 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 200 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
Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

 
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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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…

730 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