Hi everyone. I am working on a page where the content of the page rarely changes(but it can be changed by the user whenever he wants) so I want to make that page to load fast and getStaticProps
does this for me and on any change I can just revalidate that route, but cause thats the product page I want to save the user views on that page. I can save the user who are logged in with their IDs but for non logged in user I have to save their IP and now the problem is for the IP I cant use the staticProps
and I have to use serverSideProps
which is way more slower than staticProps
!, what do you guys suggest I should do? (How can I have the best of both worlds?)
I have searched and every answer just suggests that you have to use serverSideProps
Similar question on Stackoverflow: (but the approved ans suggests serverSideProps) Get the client IP on NextJS and use SSR