for tl;dr check the example
I am using Biblatex (biber-backend) as bibliography tool, but I guess this question could be relevant for Bibtex as well. The style I use is: authoryear-icomp
I cite like this:
\****cite[<number>]{<bibkey>}
That way Biblatex recognizes the number as page and a repeated citation cites as:
(ibid.)
Now to the problem:
I have same sources with special page numbers like "20:16" (or postnotes like "chapter XY"), so Biblatex does not recognize it as page number and I have to cite it like:
\****cite[p.~20:16]{<bibkey>}
That of course means Biblatex does not recognize repeated citation and cites it as:
(ibid., p. 20:16)
instead of:
(ibid.)
Example (how it should be)
<text1> \cite[\ibid{chapter XY}]{authorXY}. <text2> \cite[\ibid{chapter XY}]{authorXY}
becomes:
<text1> (authorXY, chapter XY). <text2> (ibid.)
but
<text1> \cite[\ibid{chapter XY}]{authorXY}. <text2> \cite[\ibid{chapter AB}]{authorXY}
becomes:
<text1> (authorXY, chapter XY). <text2> (ibid., chapter AB)
The ibid{...} - command is just a placeholder, because I don't know how to achieve, what I described. It is just to explain the idea.
I hope that clears things up.
Help and ideas are very much appreciated :)
Many thanks in advance!

biblatexaccept:as page number characters (via\DeclareNumChars*{:}), then there would be no need for thep.~prefix. – moewe Jan 14 '15 at 16:22\cite****[\ibid{XYZ}]{<bibkey>}confuses me, sorry. Another thing you should think about is where you want to draw the line on what postnote is to be dropped when doubled (p. 14,chapter 14etc.) and what is to be retained, you probably would not want an important postnote comment to be dropped, just because it happens to appear twice. – moewe Jan 14 '15 at 17:06\ibidcommand suddenly appearing, do you want only postnotes seasoned with this (presumably to-be-defined) command to be dropped if doubled? I could find a solution to drop all subsequent postnotes that appeared immediately before. – moewe Jan 14 '15 at 17:20\ibidcommand you seem to have in mind would probably have to manipulate quite some intestines ofbiblatex, I'll see what I can come up with. – moewe Jan 14 '15 at 17:38