New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blog caching #507
Comments
Hi Lucas. I haven't had any issue with browser page caching, so there hasn't been anything for me to deal with. Why don't you hop onto IRC via either...
... where it will be easier to help you. Thanks! |
Are you referring to, when developing a theme how do deal with the fact that the browser caches artifacts, forcing you to HARD reload every time or not see your changes? This is the universal developers query and there is many ways of dealing with it. I use a program called coda, which is a web ide that has a debugging browser that never caches. Cheaper solutions include developer plugins for your favorite browser, or debug mode (like in safari) which has a |
No IRC love. Like a jilted paramour, my heart is in tatters. FWIW, I use Safari in regular, non-debug mode, and all I need to do is a normal page reload to update the cached assets. I serve the files locally via |
I know that feel @justinmayer. I also always test locally before deploying it with the simple server that python has so I don't encounter this either with Firefox. |
Sorry for trying to be helpful!!! sigh ;p |
No, I'm not having problems with browser caching during development, the problem is when the code is deployed... currently I'm using heroku with ruby's Rack TryStatic middleware. |
Hmm. As the BunnyMan said in his original comment, there's nothing about browser asset caching that's specific to Pelican. Perhaps the Heroku or Rack communities would be better positioned to help. In any case, this sounds like a Rack config issue. Do you have static asset caching enabled anywhere? Anything like this?
|
So you deploy but old content is still being displayed? I'm inexperienced with heroku so I can't help, sorry. |
@tbunnyman , yes, I can only see the new content with a hard reload =S @justinmayer , no, I'm not aware of these Rack configurations. Is there anyone using Rack to serve a pelican blog or it's just me? |
I know someone other than yourself has mentioned it but no complaints. |
I deployed my Pelican to GitHub pages and this also happened to me. Browser cached my statically served pages and I had to perform hard reload to get the newest document. As I generated some little stuff by cron on daily basis (list of events), it was not very nice, because my visitors had seen expired list of events from yesterday until they hardrefreshed the page (but no normal person does this, really). As there is no way to change the way GitHub serves static pages (e.g. HTTP headers, I think you could adjust them to somehow prevent such behaviour, at least for often-changing pages), I finally decided to move it to Heroku - I turned the list of events into a proper, dynamic Python/Flask Heroku app. |
@honzajavorek , that's what I'm trying to do now... I'm changing some Ruby/Rack configurations to see what can solve this kind of problem. So... what's your Flask app? Can you share this code with me? |
@lucassmagal I actually completely rewritten the whole thing into normal dynamic app. So it's not a solution for you. I had a list of events generated by cron into a static page. I turned it into full-featured dynamic Flask app with views, the list of events is generated on request now. |
@honzajavorek , it seems a interesting approach, even it's not a solution for me, I'm really curious about it. |
@lucassmagal Well, look here for the original app: https://github.com/honzajavorek/zitkino Now I am trying to turn it into proper app. It's not done yet, I develop it in https://github.com/honzajavorek/zitkino/tree/standalone-app. |
I think this discussion has run its course. Issue closed. |
I am having the same issue. I am deploying to github pages using travisci and I have to hard reload the home page to see the most up to date version. Is there any solution to this? |
@eamonnfaherty-productmadness: This doesn't have anything to do with Pelican. Moreover, what you are describing sounds, to me, the way browser caching is designed to work. I don't understand what the perceived problem is. |
Hello guys,
I have, finally, deployed my blog. I'm still hacking the theme, but almost everything is fine, except one thing: browser page caching.
How are you dealing with it?
The text was updated successfully, but these errors were encountered: