kelyvin / ghost-caffeine-theme

A minimalist, Material Design inspired Ghost Theme for optimal desktop and mobile experiences
https://caffeinecoding.com
MIT License
333 stars 97 forks source link

Posts page broken in Safari Private browsing #2

Closed andrewlock closed 8 years ago

andrewlock commented 8 years ago

Hi Kelvin,

First off nice theme - I plan on adapting it for my new blog soon.

I noticed you've switched to using localStorage in place of js-cookie. I was wondering what the bug you refer to is in the update?

Unfortunately the switch to store.js means the theme is currently broken when store is not available, which happens for example in Safari Private browsing mode. As someone that uses private browsing quite a lot that seems like a big limitation. Especially as there is no warning, the posts just don't load (see screenshot).

image

kelyvin commented 8 years ago

Hi Andrew,

First off, thanks for checking out the theme and I'm glad you're liking it so far! Also, thanks for thoroughly going through multiple user scenarios to help discover these kind of issues!

I switched from js-cookie to store.js because I realized some of the limitations of cookies if I wanted to implement some more advanced features in the future. Potentially I may want to store metadata on the user's browser to help provide them a custom experience without any need for a special backend API or service (trying to keep the theme as lightweight + speedy as possible).

I was not aware of the issue in private mode, and this bug is mostly likely due to bad error handling on my part. I will take a look at it and will implement a patch very soon (hopefully later today).

Thanks!

kelyvin commented 8 years ago

Thanks again for reporting this issue. It should now be resolved in the latest commit: https://github.com/kelyvin/caffeine-theme/commit/e75490b4633df874ed8bcc7690f9356f8a5bb6e7

This fix will render the posts page correctly and let me know if you still run into any other issues.