php - Whether or not to use iframe in an application -
i creating application utilize web sockets notification system. improve have application in iframe web sockets in parent there isn't new connection every time page loaded? or maybe should re-connect?
what thoughts?
if has other way in php force notifications without sending ajax request every 10 seconds allow me know.
thanks.
this 1 of options have described.
the problem alternative there wont direct command on content of inner iframe, , need implement force message window communication between parent of iframe, in order able alter iframe src attribute, in case refresh parent page, , iframe should refresh actual state, not initial page. sec problem, there no seo @ all. page wont crawlerable search engine robots. if seo of import application - not option. in websockets, if work sessions, of import create session available normal php script , websockets logic, in order maintain consistent access info self. php create not easy task @ all.
you might consider long pull technique well, allows open 1 ajax request , responses back, , request can lastly time close , have reopened on client-side.
another alternative review actual application architecture, , think of single-page application. have cons , pros. thing it, ux much higher. response times load less content , data. pros requires lots of development on front-end side in javascript. there 2 major routes can single-page applications. consistent , inconsistent. in first case need create sure back-end server static html on refresh or navigating specific link, same way single-page application generate using java-script. solves issues seo. while inconsistent approach, purely on javascript (front-end), , have issues seo.
websockets used single-page applications, illustration facebook chat great illustration of such. or google talk while in gmail account. not meant used refreshed pages, handshake process bit more heavy normal http request.
php websocket phpwebsocket
No comments:
Post a Comment