fancyhdr
provides the \iffloatpage
macro that can be used to customize header and footer for pages which contain only floats.
\documentclass{book}
\usepackage{fancyhdr}
\fancyhead{}
\fancyhead[LE,RO]{\iffloatpage{}{\slshape\rightmark}}
\fancyhead[LO,RE]{\iffloatpage{}{\slshape\leftmark}}
\fancyfoot{}
\fancyfoot[C]{\iffloatpage{}{\thepage}}
\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
\pagestyle{fancy}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\blinddocument
\begin{table}[p]
\centering
(Table contents)
\caption{A table on a separate page}
\end{table}
\end{document}
EDIT: For those that want to use the \iffloatpage
macro with KOMA-script's scrpage2
package instead of with fancyhdr
, add the following to your preamble (thanks to Stefan Kottwitz for the tip):
\makeatletter
\newcommand*{\iffloatpage}[2]{\if@fcolmade #1\else #2\fi}
\makeatother
(The blindtext package is only used to add some dummy text to the example.)