Will the JavaScript src JavaScript attribute follow the HTTP redirect in all browsers

Let's say the src attribute of a javascript tag points to a redirect:

<script src="http://foo.com/foo.js"></script>

where http://foo.com/foo.js is a 301 redirect to https://foo.com/foo.js ...

Will all browsers successfully download the JS file? I noticed that it works in Chrome, Firefox, Safari and IE9 ... but I'm just wondering if this is something in the spec or just by accident ...

+5
source share
2 answers

- ( script , - ) , ( HTTP TCP/IP).

, , , script , . 3 301:

  • URL-
  • .
  • .
+2

301: - 301-

+4

All Articles