Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will JavaScript tag's src attribute follow HTTP redirects in all browsers

Let's say, a javascript tag's src attribute 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 load the JS file? I've noticed it seems to work in Chrome, Firefox, Safari, and IE9... but I'm just curious if this is something that's in a spec or just random...

like image 344
Aaron Gibralter Avatar asked May 31 '11 02:05

Aaron Gibralter


1 Answers

You can check out the following topic on behavior of different browsers to handle 301 redirect: Client Web Browser Behavior When Handling 301 Redirect

like image 101
rachel Avatar answered Oct 06 '22 18:10

rachel