We read:
Attributes (attribute) is a property of the vertex. Vertices may have different attributes. For example, the position coordinates in space, the coordinates of the normal vector, color. In addition, you can pass any attributes to the vertex shader. It is important to understand that an attribute is a property of a vertex, and therefore it must be defined for each vertex. Attributes are passed to only the vertex shader. Attributes are accessible only by the vertex shader and cannot be overwritten.
Uniforms (uniform) are external data that can be used for calculations, but cannot be overwritten. Uniforms can be transferred to both vertex and fragment shaders. Uniforms have nothing to do with a particular vertex and are global constants. For example, as a uniform, you can transfer to the shader the coordinates of the light source and the coordinates of the eye (camera).
For the first:
Attributes are accessible only by the vertex shader and cannot be overwritten.
For the second:
Uniforms (uniform) are external data that can be used for calculations, but cannot be overwritten.
Conclusion:
both can be read but not overwritten.
Question:
How do they differ?