http server push to trigger an action
I am trying to implement server push where in some action can be triggered based on a time interval elapsed in the server. I thought of doing it this way as I do not have to take care of the javascript timer , browser dependency, users disabling javascript. I tried CGI::Push, but I am not sure how can i trigger an event using it. Say If I want to submit the 开发者_开发知识库form based on some response received from server. If there is some better way to initiate time controlled events, I am looking for them.
There are a few ways to make a browser perform an action:
- User activity
- Client-side javascript
- HTTP 301 redirection
- HTML meta refresh/redirection
However, as far as I'm aware only the first two (user activity and client-side javascript) can submit a form, and only javascript can interact with the server automatically. So if the user has javascript disabled, you can't make their browser do something -- which is kind of the reason why people disable javascript in the first place.
精彩评论