[Building Sakai] Discussion how to handle X-Frame in the New IFrame tool (SAK-21624)

Charles Severance csev at umich.edu
Sat Feb 16 08:08:30 PST 2013


Matt,

The approach to compensate after the page is load in Javascript seems to me like it would be flaky.

It would seem that the better approach would be to do an in-server request of the headers and cache the X-Frame option for some fixed time and recheck every few hours (settable via property).

The cache would make it scale nicely (i.e. everyone is not waiting for the HEAD request) and not depend on some kind of timeout in JavaScript that also would need tuning.

Thoughts / comments welcome.

/Chuck

On Feb 7, 2013, at 12:38 AM, Matthew Jones wrote:

> It looks like you can set an onload on the iframe and see if it worked or not from javascript.
> http://javascript.info/tutorial/same-origin-security-policy
> 
> In modern browsers you can do this dynamically, but for older versions of IE it seems like it has to be inline. 
> http://stackoverflow.com/questions/4334520/load-event-for-iframe-not-fired-in-ie
> 
> It would maybe either have to try to load the page in a hidden iframe or try to load the page and switch to popup if it fails? This seems like it might be better than having the server check the URLs, though if the server checked it could scan for all the images on the page and make a nice preview image for the popup link like Facebook does. ;) 
> 
> 
> On Thu, Feb 7, 2013 at 12:24 AM, Charles Severance <csev at umich.edu> wrote:
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130216/38c927d2/attachment.html 


More information about the sakai-dev mailing list