how effective is:
var i=new Image();
i.src='http://secondary.domain.com/command.gif?command=somecmd&rand='+....epoch time....;
... mod_rewrite the above url to php script ...
as a way to get around crossdomain restrictions for '1 way only' style ajax commands.
we have a bunch of commands that always return 204 anyways. so we were thinking of moving these onto another box.
how much faith can we have in the browser hitting the image even if we dont render it.
anyone know any crossbrowser issues with this off hand?
开发者_运维问答would it be better to actually render a 1px/1px image somewhere in the dom to make sure the image gets hit?
session based stuff already taken care of using memcached and setting the cookie to .domain.com.
thanks!
I would suggest using JSONP instead of this method. Check out: http://en.wikipedia.org/wiki/JSONP. You don't have to worry about rendering a script tag.
精彩评论