So, my question is that I have to display a webpage in 2 different ways when I click on 2 different links. If I click link 1, the webpage I would like to display, will hide some content and display to the user. If I click link 2, the webpage will display in a default method. I know how to hide the content using JS and CSS. But how to make the other page know what to display? Should I send any unique variable to let it know, on what to display?
Asked
Active
Viewed 61 times
0
-
4You can send some value in query string to differentiate the link1 and link2 like http://example.com?lk=1 and http://example.com?lk=2 – Naveen Chandra Tiwari Feb 25 '20 at 04:12
-
Or just create two pages that both include the same content, except one page doesn't include the bit you want to "hide". – Cully Feb 25 '20 at 04:14
-
Why do you "have to"? Because without a very good explanation of that: no, you don't. – Mike 'Pomax' Kamermans Feb 25 '20 at 04:15
-
You need to access http headers:https://stackoverflow.com/questions/220231/accessing-the-web-pages-http-headers-in-javascript like what Naveen Chandra Tiwari answered. – user10971804 Feb 25 '20 at 04:20