I asked about the compact trace embedding (trace embedding). In the answer, embeddings are used to answer my question as follows: For $N \ge 3,$
- trace map $W^{1,2}(\Omega) \to W^{1/2,2}(\partial \Omega)$ is bounded,
- inclusion $W^{1/2,2}(\partial \Omega) \to L^1(\partial \Omega)$ is compact,
- inclusion $W^{1/2,2}(\partial \Omega) \to L^{q^*}(\partial \Omega)$ with $q^* = \frac{2(N-1)}{N-2}$ is bounded.
By interpolation, the inclusion $W^{1/2,2}(\partial \Omega) \to L^{q}(\partial \Omega)$ is compact for all $q \in [1,q^*)$, and the claim follows.
The only modification needed in the case $N=2$ is that this time $W^{1/2,2}(\partial \Omega) \to L^{q}(\partial \Omega)$ is bounded for all $q<q^*=\infty$, but not for $q=q^*$. This is because the Sobolev embedding doesn't work if $\textrm{order of derivatives} \times \textrm{exponent} = \textrm{dimension}$. The claim follows in the same fashion.
He/she said "If you need a reference, you can find these embeddings in Hitchhiker's guide to the fractional Sobolev spaces(https://arxiv.org/abs/1104.4345)."
However, I couldn't find the above embeddings in [https://arxiv.org/abs/1104.4345] exactly. Are there anything I miss? If so, would you explain it in detail? I would be grateful for any comment about it or my original question (trace embedding)
I will answer your original question. By density you can assume that $u$ is regular and that $\Omega$ is a rectangle, say, $(a,b)\times (c,d)$. By the fundamental theorem of calculus and Holder's inequality $$|u(x,c)|^r\le |u(x,y)|^r+\int_c^y r|u(x,s)|^{r-1}|\partial_yu(x,s)|\,ds.$$ Integrating in $x$ you get $$\int_a^b|u(x,c)|^rdx\le \int_a^b|u(x,y)|^rdx+\int_a^b\int_c^y r|u(x,s)|^{r-1}|\partial_yu(x,s)|\,dsdx.$$ Integrating in $y$ over $(c,c+\varepsilon)$ gives $$\varepsilon\int_a^b|u(x,c)|^rdx\le \int_c^{c+\varepsilon}\int_a^b|u(x,y)|^rdxdy+\varepsilon\int_a^b\int_c^{c+\varepsilon} r|u(x,s)|^{r-1}|\partial_yu(x,s)|\,dsdx.$$ By Holder's inequality you get $$\varepsilon\int_a^b|u(x,c)|^rdx\le \int_c^{c+\varepsilon}\int_a^b|u(x,y)|^rdxdy+r\varepsilon\left(\int_a^b\int_c^{c+\varepsilon} |u(x,s)|^{2(r-1)}dsdx\right)^{1/2}\left(\int_a^b\int_c^{c+\varepsilon} |\partial_y u(x,s)|^2dsdx\right)^{1/2} $$ If $r=1$ you get $$\int_a^b|u(x,c)|\,dx\le\frac1\varepsilon \int_c^{c+\varepsilon}\int_a^b|u(x,y)|\,dxdy+((b-a)\varepsilon )^{1/2}\left(\int_a^b\int_c^{c+\varepsilon} |\partial_y u(x,s)|^2dsdx\right)^{1/2}. $$ This inequality gives you compactness of $W^{1,2}(\Omega) \hookrightarrow L^{1}(\partial \Omega)$. Indeed, if you have a bounded sequence in $W^{1,2}(\Omega)$, then by Rellich-Kondrachov compactness, a subsequence $\{u_n\}$ will converge to some function $u$ in $L^2(\Omega)$ and so $$\int_a^b|(u_n-u)(x,c)|\,dx\le\frac1\varepsilon \int_c^{c+\varepsilon}\int_a^b|(u_n-u)(x,y)|\,dxdy+((b-a)\varepsilon )^{1/2}C. $$ Letting $n\to \infty$ gives $$\limsup_n\int_a^b|(u_n-u)(x,c)|\,dx\le ((b-a)\varepsilon )^{1/2}C. $$ and now you let $\varepsilon\to 0$ to conclude that $$\lim_n\int_a^b|(u_n-u)(x,c)|\,dx=0.$$
If $r>1$ you get $$ \varepsilon\int_a^b|u(x,c)|^rdx\le\int_c^{c+\varepsilon}\int_a^b|u(x,y)|^rdxdy+r\varepsilon\left(\int_a^b\int_c^{c+\varepsilon} |u(x,s)|^{2(r-1)}dsdx\right)^{1/2}\left(\int_a^b\int_c^{c+\varepsilon} |\partial_y u(x,s)|^2dsdx\right)^{1/2} \\\le \int_c^{c+\varepsilon}\int_a^b|u(x,y)|^rdxdy+r\varepsilon \int_a^b\int_c^{c+\varepsilon} |u(x,s)|^{2(r-1)}dsdx+r\varepsilon \int_a^b\int_c^{c+\varepsilon} |\partial_y u(x,s)|^2dsdx. $$ Since $N=2$ you have that $W^{1,2}(\Omega)$ is contained in $L^q(\Omega)$ for every $q<\infty$. Hence, the previous inequality says that $W^{1,2}(\Omega) \hookrightarrow L^{r}(\partial \Omega)$ for every $r$. Since for $r=1$ you have compactness, you get compactness for every $r$ by interpolation. The general case follows by flattening the boundary locally and using a partition of unity.