Please note that the suggested solutions rely on the META REFRESH technique which is regarded as bad practice in web accessibility[1] circles. (And could thus get you into trouble with local disability discrimination laws.) The reason for this is that automated page refreshes can cause major headaches for users of screen readers and other assistive/adaptive technologies. Refreshes can also take place too fast for those who may be slow readers - for whatever reason.
I'll probably get shouted down for saying this because this usage is so common and that web accessibility is sadly less known about/understood than it might be; however, it is an issue, and one of which all producers of web content should be aware.
Having said all that, let's look at the proposed solutions. In essence, we fire off the process, store the result somewhere, then go and look at it. Yes, a session cookie is a good way to maintain state between the 'searching' and 'search results' (or whatever) pages. You could also preserve state by putting something in the query string like http:// .... /foo?jobid=1234. Not as neat as a cookie, but just showing that there's more than one way to do it. (Now where have I heard that before?)
The thing that does not need to be the same as the proposed solutions is the page refresh. We could have a scripted refresh which could be turned off as a user preference (again, maintain this state with cookies) and a link or button that can allow the subsequent page to be loaded manually.
References
- Web Content Accessibility Guidelines
- From the Web Content Accessibility Guidelines, this article covers auto-forwarding specifically.
- This article doesn't specifically refer to accessibility but note Reason 2 (breaking the Back Button) causes problems for some disabled users.
Update
In addition to the two new links that I have just added above, I have received various comments from my learned colleagues in the web accessibility field. I would consider these to be out-of-scope for Perl Monks but would be willing to produce a brief meta-article on my blog which I can link from here if anyone wants to look at this further. Generally, the gist is "don't take control away from the user". Monks are invited to /msg or e-mail me if they think that elaboration would be useful.
|