Basically, you can optionally attach an “ICC Color Profile” to your JPEGS. If your viewing application (usually your web browser) supports Color Profiles, that profile will be used to render the image on your screen.

Unfortunately, none of this matters much because even Apple advises that

Printers using RA-4 will almost always advise working in sRGB IEC61966-2.1, which is also the preferred colorspace for the Internet.

Of course, there’s one more wrinkle to watch out for. Photoshop’s default “Save for the Web” (Image Ready) feature defaults to the AdobeRGB profile, which isn’t really the color space for online. Whether or not you use Save for the Web, in Photoshop:

Photoshop> Image> Mode> Convert To Profile: sRGB IEC61966-2.1 BEFORE Saving for the Web, or going to ImageReady, or posting on the web