servletsgoogle-chromehtml5-videogoogle-chrome-frame

Chrome (or chrome frame) sends two or more requests instead of one?


I use HTML5 video tag, back-end is on Java. It works fine in Firefox but in Chrome it sends more than one requests to servlet and finally there is Exception in servlet and it doesn't work.

I've read that firstly to make element in DOM and then assign src to it, but still it sends more than one requests.

Do you have any solutions for me?


Solution

  • I don't really know why Chrome sends more than one request to your servlet. But honestly, I think you should just fix the exception cause in your servlet because basically you have no control over the requests that anyone (Chrome or a possible attacker) sends to your service. When communicating with the "outside" any component should expect the unexpected.

    If you provide the stack trace and/or some additional information, possibly in a new question, you might get some help with this issue.