Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #28316 > unrolled thread
| Started by | Luis <roy1mos@gmail.com> |
|---|---|
| First post | 2015-07-07 03:42 -0700 |
| Last post | 2015-07-08 15:20 +0200 |
| Articles | 11 — 6 participants |
Back to article view | Back to comp.lang.javascript
How to Cache a page for 24 hours in Javascript Luis <roy1mos@gmail.com> - 2015-07-07 03:42 -0700
Re: How to Cache a page for 24 hours in Javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-07 13:17 +0200
Re: How to Cache a page for 24 hours in Javascript Luis <roy1mos@gmail.com> - 2015-07-07 15:44 -0700
Re: How to Cache a page for 24 hours in Javascript "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-07-08 00:54 +0200
Re: How to Cache a page for 24 hours in Javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-08 09:22 +0200
Re: How to Cache a page for 24 hours in Javascript "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-07-07 08:17 -0700
Re: How to Cache a page for 24 hours in Javascript Luis <roy1mos@gmail.com> - 2015-07-07 15:46 -0700
Re: How to Cache a page for 24 hours in Javascript "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-07-07 19:32 -0700
Re: How to Cache a page for 24 hours in Javascript Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-07-08 12:07 +0200
Re: How to Cache a page for 24 hours in Javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-08 12:13 +0200
Re: How to Cache a page for 24 hours in Javascript Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-07-08 15:20 +0200
| From | Luis <roy1mos@gmail.com> |
|---|---|
| Date | 2015-07-07 03:42 -0700 |
| Subject | How to Cache a page for 24 hours in Javascript |
| Message-ID | <d4eabb49-1e6f-4341-8785-fa7d7450951e@googlegroups.com> |
I need to use Javascript to implement caching. I am using Apache as my web server on a CentOS linux server. I am using PHP for dynamic content in my web pages. -I need to ensure my website pages are cached for 24 hours after they are first loaded. -I need to ensure my website images are cached for one week after they are first loaded. -I need to ensure my website videos are cached for one week after they are first loaded. What is the recommended way to do this? Any feedback/recommendations links to best practices would be appreciated.
[toc] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2015-07-07 13:17 +0200 |
| Message-ID | <XnsA4D0873B29BADeejj99@194.109.6.166> |
| In reply to | #28316 |
On 07 Jul 2015, you wrote in comp.lang.javascript: > I need to use Javascript to implement caching. Why Javascript? You mean caching on the server? Why "need" and not just "want"? Is this a school or other learning assignment? > I am using Apache as my web server on a CentOS linux server. > I am using PHP for dynamic content in my web pages. So why not PHP on your server? > -I need to ensure my website pages are cached for 24 hours after they > are first loaded. -I need to ensure my website images are cached for > one week after they are first loaded. -I need to ensure my website > videos are cached for one week after they are first loaded. "First loaded"? You still mean cashed on the server? > What is the recommended way to do this? Whose recomendation are you referring to? > Any feedback/recommendations links to best practices would be > appreciated. "best" being a dirty word in Qs like these. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Luis <roy1mos@gmail.com> |
|---|---|
| Date | 2015-07-07 15:44 -0700 |
| Message-ID | <eb32ed0c-6d97-4d7f-86bd-f5e3383b7e0c@googlegroups.com> |
| In reply to | #28317 |
Hi Evertjan, I need to cache on the client NOT on the server. It's a corporate mobile application with lots of files/video content that I am working on. The content is pretty much static daily for each group within a large department. On Tuesday, July 7, 2015 at 7:17:42 AM UTC-4, Evertjan. wrote: > On 07 Jul 2015, you wrote in comp.lang.javascript: > > > I need to use Javascript to implement caching. > > Why Javascript? > You mean caching on the server? > > Why "need" and not just "want"? > Is this a school or other learning assignment? > > > I am using Apache as my web server on a CentOS linux server. > > I am using PHP for dynamic content in my web pages. > > So why not PHP on your server? > > > -I need to ensure my website pages are cached for 24 hours after they > > are first loaded. -I need to ensure my website images are cached for > > one week after they are first loaded. -I need to ensure my website > > videos are cached for one week after they are first loaded. > > "First loaded"? > You still mean cashed on the server? > > > What is the recommended way to do this? > > Whose recomendation are you referring to? > > > Any feedback/recommendations links to best practices would be > > appreciated. > > "best" being a dirty word in Qs like these. > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2015-07-08 00:54 +0200 |
| Message-ID | <mnhlan$fvh$1@solani.org> |
| In reply to | #28348 |
Luis wrote: > I need to cache on the client NOT on the server. > It's a corporate mobile application with lots of files/video content that I am working on. > The content is pretty much static daily for each group within a large department. Let the browser do the caching; don't do it yourself (unless you have very specific reasons). -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2015-07-08 09:22 +0200 |
| Message-ID | <XnsA4D15F6D5F8FBeejj99@194.109.6.166> |
| In reply to | #28348 |
Luis <roy1mos@gmail.com> wrote on 08 Jul 2015 in comp.lang.javascript: > I need to cache on the client NOT on the server. [please do not top post on usenet] I suspect you mean browser with "client"? Browser cashing has a special meaning, that is just for the benefit of a quick reloading of a page. [yes, I know browser-security can be swithed off, please know what you are doing!] Perhaps it is that you want to "backup" a website by "catching" all new content for a while [days/weeks]? I would not use a browser for that, as a browser is made secure by NOT being able to have access to your HDs. Better use wscript/jscript on your pc for that, using Xmlhttp, Scripting.FileSystemObject and perhaps a database. Javascript can be used there. Or, on an ASP platform on a different server than your PHP-one, also using Xmlhttp, Scripting.FileSystemObject and perhaps a database. You can do that with serverside Javascript. Both can be triggered to do this job say several times a day. > It's a corporate mobile application with lots of files/video content > that I am working on. The content is pretty much static daily for each > group within a large department. "static daily"?? -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2015-07-07 08:17 -0700 |
| Message-ID | <e7fca1e7-65f4-420b-aa65-eacfc67be6dc@googlegroups.com> |
| In reply to | #28316 |
On Tuesday, July 7, 2015 at 5:42:18 AM UTC-5, Luis wrote: > I need to use Javascript to implement caching. > I am using Apache as my web server on a CentOS linux server. > I am using PHP for dynamic content in my web pages. > > -I need to ensure my website pages are cached for 24 hours after they are first loaded. > -I need to ensure my website images are cached for one week after they are first loaded. > -I need to ensure my website videos are cached for one week after they are first loaded. > > > What is the recommended way to do this? > > Any feedback/recommendations links to best practices would be appreciated. Just use PHP for this and set the appropriate headers. This is off-topic in this forum.
[toc] | [prev] | [next] | [standalone]
| From | Luis <roy1mos@gmail.com> |
|---|---|
| Date | 2015-07-07 15:46 -0700 |
| Message-ID | <e79f4a1f-1e6a-4581-907e-4f1d3d8a6593@googlegroups.com> |
| In reply to | #28319 |
Hi Michael, Why the round trip each time the page is loaded? Engineers access the same page multiple times per appointment. Why not store the page on the client for the rest of the day? On Tuesday, July 7, 2015 at 11:17:17 AM UTC-4, Michael Haufe (TNO) wrote: > On Tuesday, July 7, 2015 at 5:42:18 AM UTC-5, Luis wrote: > > I need to use Javascript to implement caching. > > I am using Apache as my web server on a CentOS linux server. > > I am using PHP for dynamic content in my web pages. > > > > -I need to ensure my website pages are cached for 24 hours after they are first loaded. > > -I need to ensure my website images are cached for one week after they are first loaded. > > -I need to ensure my website videos are cached for one week after they are first loaded. > > > > > > What is the recommended way to do this? > > > > Any feedback/recommendations links to best practices would be appreciated. > > Just use PHP for this and set the appropriate headers. > > This is off-topic in this forum.
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2015-07-07 19:32 -0700 |
| Message-ID | <b03dc986-5e8d-4e72-8cd8-a1989a308cb6@googlegroups.com> |
| In reply to | #28349 |
On Tuesday, July 7, 2015 at 5:46:38 PM UTC-5, Luis wrote: > Hi Michael, > Why the round trip each time the page is loaded? > Engineers access the same page multiple times per appointment. > Why not store the page on the client for the rest of the day? That's not how caching works. Set the appropriate headers from the server and let every point in between do its job.
[toc] | [prev] | [next] | [standalone]
| From | Erwin Moller <erwinmollerusenet@xs4all.nl> |
|---|---|
| Date | 2015-07-08 12:07 +0200 |
| Message-ID | <559cf681$0$2881$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #28349 |
On 7/8/2015 12:46 AM, Luis wrote: > Hi Michael, > Why the round trip each time the page is loaded? > Engineers access the same page multiple times per appointment. > Why not store the page on the client for the rest of the day? > [Please don't top post] I think you need to read up a little on the mechanics of caching (and some browser-bugs). You can start in many places, so here is a random one: http://stackoverflow.com/questions/4480304/how-to-set-http-headers-for-cache-control Regards, Erwin Moller -- "That which can be asserted without evidence, can be dismissed without evidence." -- Christopher Hitchens
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2015-07-08 12:13 +0200 |
| Message-ID | <3559522.acKQn9LboL@PointedEars.de> |
| In reply to | #28360 |
Erwin Moller wrote: > On 7/8/2015 12:46 AM, Luis wrote: >> Why the round trip each time the page is loaded? >> Engineers access the same page multiple times per appointment. >> Why not store the page on the client for the rest of the day? > > […] > I think you need to read up a little on the mechanics of caching (and > some browser-bugs). > You can start in many places, so here is a random one: > > http://stackoverflow.com/questions/4480304/how-to-set-http-headers-for-cache-control For me, the standard text on Web caching still is <https://www.mnot.net/cache_docs/> I notice that it has been redesigned since my last visit, and is better readable now. -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix> Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Erwin Moller <erwinmollerusenet@xs4all.nl> |
|---|---|
| Date | 2015-07-08 15:20 +0200 |
| Message-ID | <559d23a4$0$2920$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #28363 |
On 7/8/2015 12:13 PM, Thomas 'PointedEars' Lahn wrote: > Erwin Moller wrote: > >> On 7/8/2015 12:46 AM, Luis wrote: >>> Why the round trip each time the page is loaded? >>> Engineers access the same page multiple times per appointment. >>> Why not store the page on the client for the rest of the day? >> >> […] >> I think you need to read up a little on the mechanics of caching (and >> some browser-bugs). >> You can start in many places, so here is a random one: >> >> http://stackoverflow.com/questions/4480304/how-to-set-http-headers-for-cache-control > > For me, the standard text on Web caching still is > > <https://www.mnot.net/cache_docs/> > > I notice that it has been redesigned since my last visit, and is better > readable now. > That page surely looks like a very decent in-depth explanation. Bookmarked! Thank you. Regards, Erwin Moller -- "That which can be asserted without evidence, can be dismissed without evidence." -- Christopher Hitchens
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web