Hi folks! I've just committed a new javascript-based network access detection technique.
A problem that I thought would be simple to solve turned into a nasty one mostly because of the same-origin-policy of the browsers, our DNS blackholing techniques, our SSL captive portal (aka certificate errors) and the fact that google can't help since we are the only ones trying to detect network connectivity through a browser.. It relies on a javascript trick that works on every browser*. Adding an image tag to a div dynamically and if the image loads successfully (meaning network access) it triggers a redirection on the onload event. Thanks to my Web hacker friends last_call and synner for the pointer. Well, it seems nailed now, I tested IE 8, FF 3.6, Chrome 9, Safari 5 and it worked everywhere. So, for now, it's only applied to the pending.html template (shown when a node is in the pending state, usually used in custom guests captive-portal workflows) and I'll be looking for some broader testing / martyrs to push it forward and hopefully replace our "please re-open your browser". If anyone here is willing to test. Let me know! Cheers and have a great week-end! * Right now there's a problem with Opera 11 / 11.01 but they should fix it. Opera 10.x is ok. See: http://my.cn.opera.com/community/forums/topic.dml?id=880632&t=1298063094 -- Olivier Bilodeau obilod...@inverse.ca :: +1.514.447.4918 *115 :: www.inverse.ca Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence (www.packetfence.org) ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Packetfence-devel mailing list Packetfence-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/packetfence-devel