The Back/Forward buttons

If you have post data, the browser will alert you on Back/Forward buttons. Sometimes, this is inconvenient. An option is to calculate the length of the GET string, and if it is within your tolerance, whatever that may be, change the form method to “GET".

Works great. Very little effort. Code includes dojo.

Code

/* Check to see if you can create a get string of less than 255 characters */
var aInputs=('id_of_first_input','id_of_second_input','etc');
var l=aInputs.length;
for (i=0;i<l;i++)
  if (dojo.byId(aInputs[i]) != null)  
    sD+=aInputs[i]+'='+dojo.byId(aInputs[i]).value+'&';
if (sD.length < 255)
  frm.method='get';

* Within your tolerance refers to the fact that different browsers and servers may function … differently.

PHP Sessions

I’m used to working on busy public servers. For my latest project, I have a server all to myself (what fun!). Could not understand why the sessions weren’t timing out.

The key php.ini settings that resolved the issue were the garbage collection numbers. After all, PHP doesn’t check the session files for timeouts on every request.

In addition, if you don’t assign a value to a session variable on every request, the timestamp on the file isn’t updated - so the session will timeout regardless of activity.

&#58;&#111;&#111;&#112;&#115;&#58;

PHP Sessions

http://us2.php.net/manual/en/ref.session.php

session.gc_probability
session.gc_divisor
session.gc_maxlifetime

Cookies

To use the cookie to limit the session length, regardless of activity, use session_set_cookie_params to set the lifetime of the cookie.

http://us2.php.net/manual/en/function.session-set-cookie-params.php

Web 3.0

Web 3.0 will be the aggregation of people’s presence on the web. It’s already happening with things like Google gadgets (maybe I’m behind the times). Imagine you participate in a social network or enjoy visiting a particular forum or blog. Instead of a simple RSS feed, you’ll be able to construct a page with those elements of those sites visible and functional. Sort of a portal into the parts of the web that are important to you.

AJAX with care

&#58;&#110;&#111;&#58;

AJAX/JSON is an extremely cool technology - using javascript to request content from servers for display. There is absolutely know doubt in my mind that it will be an important part of rich user experiences in the future of the web.

But - it shouldn’t be used everywhere. The complexity to really make it fly is expensive. If you have a simple page, or a low traffic page, or a basic application, attempting to add the layer of javascript necessary to manage the client-server communication is probably not worth it.

The Internet Explained

Tubes