An aspect of seismic design of bridges that has hardly received proper attention so far is the appropriate selection of joint gaps. End gaps define the boundary conditions of the bridge and affect its dynamic response; their proper design can lead to an improved structural performance under dynamic actions. The idea of the 'Dynamic Intelligent Bridge' is explored here, wherein current bridge joints that have a fixed width are substituted by variable-width joints and, under seismic loading, the joint gap is optimised either with a one-off adjustment, or continuously (in real time) through semi-active control. In all cases, a novel device is used that permits this improved behaviour of the joints, the moveable shear key (MSK), a device for blocking the movement of the bridge deck, which has the possibility to slide, hence varying the size of the existing joint gap. In this context, the effect of gap size on the seismic response of bridges is assessed herein and a methodology is put forward for optimising this size, using a number of criteria such as maintaining the functionality of the bridge for moderate earthquakes, and ensuring the safety of the bridge and its users under earthquakes stronger than that used for design.