Thread:Project:Support desk/Possible to insert current IP in an article?/reply (4)

Not for security, but for caching ;)

Page content is aggressively cached on the server, specially for unregistered users, so the page's wikicode doesn't need to be reparsed every time a request is made. Introducing such volatile things like the client's IP address, user-agent, etc would require the cache to be disabled completely, something that can't be done on a high-traffic website.

A good fix for that would be to create some sort of simple web-service that returns the IP address of the requesting client, and write some JavaScript on the wiki to use that web-service to obtain the client's IP address and modify the page as you need (for example, dynamically adding/modifying a link based on that address).

That web-service could be a simple PHP script that echoes back the $_SERVER['REMOTE_ADDR'].