473,788 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Back-button problems on certain web sites

General advice wanted:

Some web sites (including two large companies in Australia) get
themselves awfully confused if the user presses the BACK button in
their browser (and possibly the forward button).

They are using ASP (or some other active script), but I presume it's
possible to make the same mistakes in CGI, or PHP, for instance.

Questions:
1. What is the usual cause of these difficulties - what is the
mistake(s) they have made?

2. How do I avoid the same traps when I start writing CGI (or ASP, at
gunpoint)? Are there some design principles I could follow?

I would like to allow the user a reasonable freedom to use the
back-button.
Nick Bishop
-----
I am different to most people in saying that I got sick of Hotmail -
without ever having an account there.
-oOo-

Jul 23 '05 #1
13 3258
Tim
On 21 Feb 2005 19:32:33 -0800,
ni*******@yahoo .com.au posted:
Some web sites (including two large companies in Australia) get
themselves awfully confused if the user presses the BACK button in
their browser (and possibly the forward button).

They are using ASP (or some other active script), but I presume it's
possible to make the same mistakes in CGI, or PHP, for instance.

Questions:
1. What is the usual cause of these difficulties - what is the
mistake(s) they have made?
Using scripting to change pages, where the script only runs when the user
clicks something, but does nothing, or something unwelcome, while simply
traversing pages that you've already cached.
Meta refresh statements.
Not changing URIs when going between pages (e.g. playing damn fool tricks
with cookies to change pages but using the same URI).
Making perfectly cachable pages uncachable.
2. How do I avoid the same traps when I start writing CGI (or ASP, at
gunpoint)? Are there some design principles I could follow?


Read the specs for what you do use (HTML, CSS, even scripting), obey the
rules, and take heed of the cautions.
Don't use meta refresh/reload statements.
Avoid using any sort of redirects except for their proper purposes.
Use different URIs for all pages.
Don't make pages uncachable.
Don't rely or insist on client-side scripting.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 23 '05 #2
On Tue, 22 Feb 2005, Tim wrote:
Don't rely or insist on client-side scripting.


While trying to use it the other day, I noticed that this site:

http://www.nationalrail.co.uk/planmyjourney/

has some fairly heroic arrangements for dealing with users who don't
have javascript enabled. Unfortunately, it got itself totally
confused when I changed the browser's javascript setting after
accessing the initial enquiry page.

In a sense, they were trying to "not rely on or insist on" client-side
scripting, but they had made the wrong test for it.
Jul 23 '05 #3

Tim wrote:
On 21 Feb 2005 19:32:33 -0800,
ni*******@yahoo .com.au posted:
Some web sites (including two large companies in Australia) get
themselves awfully confused if the user presses the BACK button in
their browser (and possibly the forward button). 2. How do I avoid the same traps when I start writing CGI (or ASP, at gunpoint)? Are there some design principles I could follow?
Read the specs for what you do use (HTML, CSS, even scripting), obey

the rules, and take heed of the cautions.
OK, this is simpler than I thought. Any good material, FAQs or
validators for Javascript? (I know the rest)
Don't use meta refresh/reload statements.
Understood.
Avoid using any sort of redirects except for their proper purposes.
.... What purposes might they be??? Where should I read?
Use different URIs for all pages.
Don't make pages uncachable.
Understood.
Don't rely or insist on client-side scripting.


My only use of Javascript will be as a convenience:
- Moving the cursor to the first field the user has to type in a form
- Validations that save a round-trip to the server
- Enabling/disabling fields, based on (say) a checkbox.
None of this matters if the client's javascript is off, so long as you
ALWAYS, ALWAYS, ALWAYS duplicate client-side validations on the server.

Example of Enabling/disabling fields, based on a radio-button, in a
fictitious email application

(o) Move msg to new folder
Folder name [ ] <=== Enable this when
appropriate

( ) Move msg to existing folder [pulldown-list]

( ) Bounce message to sender (useful for spam)

They are using ASP (or some other active script), but I presume it's possible to make the same mistakes in CGI, or PHP, for instance.


I also get the idea in ASP etc to fetch out required session variables
to local variables, delete the entire session variable space, then load
the required variables back in, at the beginning of each ASP script.

Nick Bishop.
-----
Email replies ignored
-----
The truth hurts, but I have nerves of steel.
-oOo-

Jul 23 '05 #4
Tim
ni*******@yahoo .com.au posted:
Some web sites (including two large companies in Australia) get
themselves awfully confused if the user presses the BACK button in
their browser (and possibly the forward button).

2. How do I avoid the same traps when I start writing CGI (or
ASP, at gunpoint)? Are there some design principles I could follow?

Tim wrote:
Read the specs for what you do use (HTML, CSS, even scripting), obey
the rules, and take heed of the cautions.
ni*******@yahoo .com.au posted:
OK, this is simpler than I thought. Any good material, FAQs or
validators for Javascript? (I know the rest)
There is no standard Javascript. Netscape invented it and wrote the most
horrible documentation for it (hard to find, hard to read, poorly explained
and poorly authored), and just about all the browsers implement it
differently. It's no wonder that JavaScript is such a complete mess.

On the other hand, there's an attempt to standardise it with ECMA script.

<http://www.ecma-international.o rg/publications/standards/Ecma-262.htm>
<http://www.ecma-international.o rg/publications/standards/Ecma-290.htm>
<http://www.ecma-international.o rg/publications/standards/Ecma-327.htm>
<http://www.ecma-international.o rg/publications/standards/Ecma-357.htm>

Have a look at the <http://www.htmlhelp.or g/> website and see what they
offer about JavaScript. I don't use it (JavaScript), and have never
bothered to get into it, because of all the problems that are not going to
get resolved in the next several years, let alone getting something to work
nicely right now.

I hope by "know the rest" you actually mean that (know where the real specs
are, and understand them), rather than learnt from something that taught
you how to do it all wrong without you realising it.
Avoid using any sort of redirects except for their proper purposes. ... What purposes might they be??? Where should I read?
You could try looking up RFC +HTTP +redirect...

But basically, use redirects when you've had to relocate something (to fix
up problems). Don't go filling a website with redirects because you think
it's a cool way to organise the structure. Don't go reloading pages on
people as they're reading them, etc.
Don't rely or insist on client-side scripting.

My only use of Javascript will be as a convenience:
- Moving the cursor to the first field the user has to type in a form
I've only ever seen poorly designed pages get that wrong. All you have to
do is have your input elements actually written in the right logical order
in the HTML (however they're actually rendered).

Umm, this:
( ) Bounce message to sender (useful for spam)


Is not "useful". What it does is spam yet another person. I've *never*
seen a spam with a real "from" address, they've *always* forged one.
Usually some other spam victim's address.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 23 '05 #5
On Mon, 28 Feb 2005 22:29:55 +1030, Tim <ti*@mail.local host.invalid>
wrote:
and just about all the browsers implement it
differently. It's no wonder that JavaScript is such a complete mess.
There's virtually no major differences with any browsers javascript
implementations , the few incompatibiliti es exist in very early
Netscape 4's where using the language="JavaS cript1.2" attribute can
cause problems.
Have a look at the <http://www.htmlhelp.or g/> website and see what they
offer about JavaScript. I don't use it (JavaScript),


Then maybe you would not be the best person to know incompatibiliti es
between it. There's very few differences between any current browser
( ([,]).length is one, but how often do people do that? ) and they are
extremely conformant to the standard.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 23 '05 #6
JRS: In article <11************ **********@f14g 2000cwb.googleg roups.com>
, dated Mon, 28 Feb 2005 02:19:19, seen in news:comp.infos ystems.www.aut
horing.html, ni*******@yahoo .com.au posted :

OK, this is simpler than I thought. Any good material, FAQs or
validators for Javascript? (I know the rest)


For that, you need a javascript newsgroup.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #7
Tim
Tim <ti*@mail.local host.invalid> wrote:
and just about all the browsers implement it
differently. It's no wonder that JavaScript is such a complete mess.

ji*@jibbering.c om (Jim Ley) posted:
There's virtually no major differences with any browsers javascript
implementations , the few incompatibiliti es exist in very early
Netscape 4's where using the language="JavaS cript1.2" attribute can
cause problems.


Ah right... that's why JavaScript tricks on webpages tend to only work on
the browsers that the author checked it with, because there's no major
differences between any of them.... (Heavy sarcasm)

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 23 '05 #8
On Tue, 1 Mar 2005, Tim wrote:
Ah right... that's why JavaScript tricks on webpages tend to only work on
the browsers that the author checked it with, because there's no major
differences between any of them.... (Heavy sarcasm)


I think you'll need to distinguish carefully between javascript the
programming language, and the browser's document object model.

Jul 23 '05 #9

Tim wrote:
Use different URIs for all pages.


Question.

I could read that two different ways.
1. Have a different URI for error pages,
2. Follow the rule "Don't use redirects except for their proper
purposes"

Elaboration:
If I have the user fill out a form, whose ACTION="theResp onse.php", and
the script theResponse.php encounters an error, is it best to send a
Redirect to an error page, or simply send out the error page under
theResponse.php URI?

Example of an error page:

ERROR0: The FBI has closed your account without warning.

or (sadly) more likely:

ERROR1: Your credit card was refused

ERROR2: Database error while trying to do a whooppie

ERROR3: You do not have enough money in your account for this

Thoughts?

Nick.
-----
Email responses ignored.
-oOo-

Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3056
by: lawrence | last post by:
I've been bad about documentation so far but I'm going to try to be better. I've mostly worked alone so I'm the only one, so far, who's suffered from my bad habits. But I'd like other programmers to have an easier time understanding what I do. Therefore this weekend I'm going to spend 3 days just writing comments. Before I do it, I thought I'd ask other programmers what information they find useful. Below is a typical class I've...
3
1698
by: icb | last post by:
Hi I have a front-end/back-end setup. The front-end utilises all unbound forms populating the back-end via the code I have written. All fine so far. Prior to splitting the database I ran the security wizard and used a shortcut from the desktop. All fine except of course I can open the back-end directly. The security FAQ appears to be out of date insofar as there is no wrkgadm.exe with 2002 and therefore you simply run the security...
4
2809
by: John Baker | last post by:
Hi: I have an application that has a back end and a front end. I need to add a table which is identical to one in the back end, and then use it for a temporary holing place form some records. I have done the following: .. Copied the table in the back end and given the copy a new name .. Created a table with the identical name to the back end copy in the front end .. Used the linkage process to link the table reference in the front end...
11
3493
by: TTroy | last post by:
Hello C programmers, Can someone tell me why ungetc can't sent back EOF, but it's sister function getc has no trouble sending it to us? For a file, this might not make a difference, but for an interactive terminal, it is probably nice to push EOF back (because to user doesn't want to provide an EOF twice). How is it getc can send EOF down it's pipe, but we can't send EOF down ungetc's pipe (especially when this pipe is the same)? ...
2
1597
by: Tammy | last post by:
Hello - I have read many threads regarding back-end security and have found them all useful. I have a couple of (what seem to be basic) questions: I have a secured front-end and back-end database. (I did use the security wizard for this.) By using the shortcuts provided, both files require a password to get in. Here is the problem: if I try to access the front-end through Windows
8
1939
by: rdemyan via AccessMonster.com | last post by:
Anyone have any ideas on how to determine when the back-end file (containing only tables) has been updated with new data. The date/time of the file won't work because it gets updated to the current date/time when the back-end file is compacted. I'm just looking for an easy way to determine when there has been a change to data in any table in the back-end file. Maybe something is updated in one of the system tables??
5
6261
by: The alMIGHTY N | last post by:
Hi all, Let's say I have a simple math formula: sum (x * y / 1000) / (sum z / 1000) I have to do this across 50 items, each with an x, y and z value, when the page first loads AND when a user modifies any of the x, y and z values.
5
4112
by: Rico | last post by:
Hello, I'm trying to create a simple back up in the SQL Maintenance Plan that will make a single back up copy of all database every night at 10 pm. I'd like the previous nights file to be overwritten, so there will be only a single back up file for each database (tape back up runs every night, so each days back up will be saved on tape). Every night the maintenance plan makes a back up of all the databases to a new file with a...
22
2805
by: Rickster66 | last post by:
As Instructed this is a new thread regarding my original post: "Select Only 10 Columns Going Back" I'm sorry for the late response. I've been gathering up information and carefully with as much detail as possible, making clear and straiforward for you. I need to create 3 new queries based on the queries that you wrote. Each query has a numerical value and a textual value. The new queries are based on the queries with a numerical value. I...
2
1330
jmoudy77
by: jmoudy77 | last post by:
Hi, I've got a database with front-ends at multiple locations that pull from a primary back-end over a satellite network. Each time a front-end closes it triggers a back-up utility that creates a back-up of the primary back-end on that front-end's local network; so that in the event the link is lost to the primary back-end, that location's will automatically connect to the back-up back-end. Confused yet, good me too. My delima is that when...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.