Why did some Caravelles have a very long dorsal fin?
The dorsal ridge housed avionics and HF antennas. From this document:


  The most noticeable difference are the larger cockpit
  windows and the removal of the dorsal fin (the long fin on top of the
  fuselage), that housed avionics. The 6R's not built for United did
  have the dorsal fin, though.


This is a non metallic radome. It protects the antenna from aerodynamic effects, and from water and ice which damage antenna electromagnetic characteristics. Closer view:


Source

The HF antenna was required when using long range HF navigation (Loran) and HF communications, typically over oceans and large non populated areas.

These features were not useful when flying over populated land, where VHF aids and VHF communication were possible. 

There is a list of C/N without the dorsal fin in this forum. When the antenna is not under a radome, it looks like this:


Source (simulator)

See also: What is this wire going from mid-fuselage to the tail on this 737?

Progress in antenna design and receivers with (hugely) increased sensibility allow for smaller antennas, that can afford to be vertical with some signal losses. Today HF antennas tend to be vertical and under a radome at the leading edge of the vertical stabilizer:


Source

Helicopters, civil and military still use long wire antennas as antenna rails when they need HF:


Source

See also: What is this pipe on the tail of this helicopter?