Jump to content

Ajax Example


just2comment

Recommended Posts

Again, I don't know if this is the right forum, but anyway...At least the first Ajax examples starting athttp://www.w3schools.com/ajax/ajax_example_suggest.aspconstruct the request including specifically a "sid" parameter as inurl=url+"&sid="+Math.random();but it is never used in the server side, e.g., ASP and PHP server examples athttp://www.w3schools.com/ajax/ajax_source.aspIs the "sid" useless? Am I missing something?

Link to comment
Share on other sites

They just add a random number onto the URL to make sure the browser doesn't cache it, that's all it's used for. They mention that here but don't name sid specifically:

Adds a random number to prevent the server from using a cached file
You could read that value on the server but, being a random number, it's not going to be very useful.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...