I was just viewing stackoverflow page source and I have a few simple questions;
1)
What is the purpose of this? DO search engines see this or something else?
<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">
2)
?v=3731 Why is this added to the end of some javascript and stylesheet files, is it to prevent the browser from caching these items? And if I am correct, then why would you not want this, I would think they wouldn’t change often
<script type="text/javascript" src="/content/js/master.js?v=3731"></script>
3)
What kind of file is this rel=”canonical”
<link rel="canonical" href="http://stackoverflow.com/questions/1180651/php-array-and-foreach">
4)
What is this, my guess is maybe if you put in the page URL into something like google reader it would find this file maybe?
<link rel="alternate" type="application/atom+xml" title="Feed for question 'php array and `foreach?'" href="/feeds/question/1180651">`
This is to enable a site to be used as a built in search within a browser. Similar to the way wikipedia can be used from the top right search bar in firefox. More info can be found here
This is to make use of browser caching, which is likely to be aggressively set with the content headers. By appending v=?, it ensures that the latest js file is used when a revision is made.
Canonical is used to specify the preferred version of a url, if that content is duplicated elsewhere.
Yes this is used to indicate that the url can serve an rss/atom feed that can be fed through a reader such as google reader.