Is it best practise to make an icon for example in Ai and then export to png resolution 72 for use on the web?
It does not matter web eessentiallyshows 1 pixel as one pixel and just ignores your pixel pitch resolution settings. But if you want illustrator to konw the size of a pixel then yes. Only number of pixels counts.
Is it best practice to make an icon for example in Ai and then export to png resolution 72 for use on the web?
Only partially. 72 mean absolutely nothing on an electronic document.
Illustrator, in my opinion, has a very clumsy unit management. It preserves the ridiculous myth that 72ppi is for the web.
If you start a document for print, with let's say cm or inches as a unit then the internal resolution of the document is 300ppi. You could export a square 1x1 inch at 300ppi and it would measure 300px.
But when you change the units of that same document to pixels (where you already designed some assets thinking that would measure 300 px) it says that your asset measures 72px... because it changes the internal resolution to 72 without warning. That is just dumb.
Another problem is that Illustrator has a very poor export dialog box, that does not tell you the important measure, pixels. You need to define it when starting a new document and working with it, not only on the export.
For this reasons, the "best" practice is:
Define pixel as a unit in Illustrator from start.
Export the asset on the resolution defined by the document internal resolution. In this case 72.
Or export the icon as SVG.
This 72ppi myth would probably end if the program added a simple dialog about the pixel dimensions.
Here is a screen capture of Corel Draw's export dialog box. It is similar to Export for web from Illustrator.
a. On the background you can see that you can make an icon any size you want on a letter size document.
And on the export, you can see and change the pixel dimensions (orange) independently on the ppi information (red)
If only they added a simple information about the resulted exported size in pixels (cyan)... I will keep dreaming...