Do 301 redirects work for CSS and JS files in a cross browser way?
Do 301 redirects work for CSS 开发者_如何学Goand JS files in a cross browser way? Like if the page has
<script type="text/javascript" src="/js/all.js" ></script>
and the server returns a 301 redirect to /js/all2.js
, will the browser seamlessly treat all2.js
as the correct js file?
Yes
Do I get a few cookies now?
This depends on the browser, most desktop browsers will follow the redirect.
Duplicate here:
Can I use a 301 redirect for included external javascript files?
精彩评论