Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Using Cookies? To fix an issue

Hi guys,

I have an issue with a website. There is full screen video, in the middle of the page there is a button to bring up the main content of the site in a div.

The issue is when a user clicks the back button on the website the video will show first, the user will have to click the button again to bring up the main content. It is not website killing but it can be a little annoying for users.

Can cookies remember that the user has already clicked the button? Or is there another way to fix this issue?

It may also be the case that is could be advanced PhP. (As I think Cookies is PhP?)

Thanks for any help guys!

1 Answer

Hi Adam,

If you only need to support say IE8 and above along with modern browsers you can use the localStorage API which is much nicer than cookies and provides a much more secure experience as the data is not accessible via HTTP headers unlike cookies.

Thanks Chris, I will look into that.

By the way this the website www.brothersindesign.com