|
Sorry I did overengineer it a little bit ... this should be enough in
gotoLink ;-)
// Goto a new unique link function gotoLink (thisHtmlElement,link){
thisHtmlElement.href = genURI(link); }
On Wed, Aug 5, 2015 at 11:52 AM, Henrik Rützou <hr@xxxxxxxxxxxx> wrote:
How to avoid cache in GET?
Well cache is something that only applies to GET since POST never
will cache.
Ask yourself if you really want to disable cache in GET's since this
will also disable caching of javascript and CSS files, GIF's and JPG's?
It may be a good idea in test but not in production, however sometimes
you want to force a GET to interact with the server even in production.
As Kevin explained it is very easy to avoid GET being cashed where
you descide it shouldn't cache you just include a unique parameter
in the GET. It requires a little plain javacript:
Or of course if it is in AJAX calls change the method to POST instead
of GET.
Here is a running example ...
<!DOCTYPE html>
<html>
<head>
<title>Building Unique Links for Get To Avoid Caching</title>
<script type="text/javascript">
// Goto a new unique link
function gotoLink (thisHtmlElement,link){
var a = document.getElementById(thisHtmlElement.id);
a.href = genURI(link);
}
// Generate Unique URI
function genURI(link){
var u = pxTS();
var t = link.search("=");
if (t < 0) {
return(link + '?pxId=' + u);
} else {
return(link + '&pxId=' + u);
}
}
// Unique timeStamp for creating Unique URI's
function pxTS() {
var now = new Date();
var ts = new Array(
now.getFullYear().toString()
,now.getMonth().toString()
,now.getDay().toString()
,now.getHours().toString()
,now.getMinutes().toString()
,now.getSeconds().toString()
,now.getMilliseconds().toString()
)
var i;
var retval = '';
for (i=0; i<ts.length; i++) {
if (ts[i].length < 2) ts[i] = '0' + ts[i];
retval += ts[i];
}
return(retval);
}
</script>
</head>
<body>
<a id="link1" href="#" onclick="gotoLink(this,'http://powerext.com');">Go
to this new link</a>
</body>
</html>
On Wed, Aug 5, 2015 at 9:04 AM, Henrik Rützou <hr@xxxxxxxxxxxx> wrote:
Gent's
Angular is like EXT JS very advanced OO javascript and therefore they
have a steep lerning curve not only specially for old Cobol and RPG
programmers but also for .ASP and PHP programmers since OO
javascript may be quite different from traditional class based OO
languages since OO javascript also uses prototyping that may be
combined with the traditional class based OO.
If I should start again I would start with taking classes or reading a
book
in the basic concept of OO javascript. That is a huge time saver before
you start using any OO javascript based framework and btw node.js
and websockets.
Also use a network outside the IBM I community, they are all around
you and you will connect with young people to whom OO javascript
is natual. Many of these free groups can be found on
http://www.meetup.com/
On Wed, Aug 5, 2015 at 5:57 AM, Bradley Stone <bvstone@xxxxxxxxx> wrote:
I looked into Angular and I saw nothing there that I needed, especially
for
basic SPAs. jQuery (and a few addons) is all I've needed (so far).
I'm sure if I dug deeper maybe I'd find something worth using, but I
think
it's much more work than needed.
My main thing was I did a few of the tutorials/lessons online and kept
thinking "ok.. how do I load data dynamically from my server... XML,
JSON,
or the next big thing.... static data is useless!"
I really grow tired of these examples where the data "fits" the lesson
(because it's created specifically FOR the lesson) when in reality the
data
and business rules are the wildcard in the project.
Brad
www.bvstools.com
On Tue, Aug 4, 2015 at 6:45 PM, Kelly Cookson <KCookson@xxxxxxxxxxxx>
wrote:
Kevin,JavaScript
I definitely am a JavaScript newbie, which is one reason I've been
delaying jumping into Angular. I want to get more familiar with
first. Also, I am waiting for other developers in my shop to learnAngular
so I can lean on them for help.from
I think your assessment of Angular correlates with what I've heard
other people using Angular: it has some great features, somedifficult to
understand features, and is not for developers who lack a solidIssues to
understanding of web development fundamentals.
Thanks,
Kelly Cookson
IT Project Leader
Dot Foods, Inc.
1.217.773.4486 ext. 12676
kcookson@xxxxxxxxxxxx
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kevin
Turner
Sent: Tuesday, August 04, 2015 6:40 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] A Responsive Single Page App (SPA) with 3
Considerdownright
Angular has some nice intuitive features, and others that are
bizarre. Most out of the box directives (you can write your own too)are
bound to properties in the controller scope either directly or viamodule,
expressions. The controller is a JavaScript component of an angular
and the scope is like the private data repository for the page. Onething
is for sure, you have to have a pretty deep understanding ofJavaScript -
not just the simple syntax but how closures, objects and injectionwork to
be able to understand Angular properly. Personally I don't think itis a
Framework that a JavaScript newbie will cope with too well (not thatI am
suggesting you are one of those :) ) On the positive side, there areIssues to
plenty of examples and helpers on StackOverflow.
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kelly
Cookson
Sent: 04 August 2015 20:02
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] A Responsive Single Page App (SPA) with 3
Consider(It's a
Mark,
Yeah, it looks like Angular is becoming the standard framework for
creating SPAs in our shop. I just haven't had time to learn it yet.
BIG learning curve going from IBM i COBOL to contemporary webdevelopment.)
situation. I
I definitely agree that SPAs are not a magic bullet for every
think an SPA might be useful for static content under somecircumstances:
of
1. If you have valued mobile users that have slow, limited bandwidth
connections to the Internet, then an SPA can help minimize the amount
information downloaded from the server. This can improve userexperience.
your
2. If the number of concurrent users is stressing the capacities of
servers, then an SPA can minimize the amount of bandwidth used, andhence
the load on your servers.your
Even under the circumstances of a static website, it can depend. If
website is basically a bunch of links to PDF files the users have tocontent
download, then I don't know how much an SPA would help for static
in the form of PDF downloads.Issues to
Thanks,
Kelly Cookson
IT Project Leader
Dot Foods, Inc.
1.217.773.4486 ext. 12676
kcookson@xxxxxxxxxxxx
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Mark
Murphy/STAR BASE Consulting Inc.
Sent: Tuesday, August 04, 2015 1:43 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] A Responsive Single Page App (SPA) with 3
Considersound
I guess this comes down to using the right tool for the job. SPA's
like a good tool to build an interactive database application where aBut, for
"page" really doesn't make sense. Why would you want to drop into the
middle of a transaction, or would that even be a good thing to do?
navigating a corporate web site that is document based, it justdoesn't
seem to fit the bill. I don't see one approach ever fitting allsituations.
Maybe what you really need is an MVC framework providing navigationwith
the content being your SPA when appropriate, and static pages whenthat is
appropriate.web400@xxxxxxxxxxxx>
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----Kelly Cookson <KCookson@xxxxxxxxxxxx> wrote: -----
To: "Web Enabling the IBM i (AS/400 and iSeries)" <
From: Kelly Cookson <KCookson@xxxxxxxxxxxx>Issues to
Date: 08/04/2015 01:43PM
Subject: Re: [WEB400] A Responsive Single Page App (SPA) with 3
Considerthe
One thing I have grown to dislike about having a single page app is
browser caching. I make changes to the files used for content within
single page app, but I often have to clear my browser cache for thechanges
to show up.page.
Add this to the fact that users cannot add particular "pages" to their
browser favorites. A favorites link always takes the user to the home
this
I'm guessing there are methods for getting around these issues. If
were going to be a large website that a business had to spend money toperformance was
maintain, or a website used by tons of people where maximum
a necessity, then I would probably do more research to resolve theabove
issues. I definitely see the maintenance and performance benefits ofsingle
page apps.I
But this is just a hobby site and unlikely to be used by many people.
don't mind spending time on it because, well, that's what hobbies aresite
for...spending time. So I'm going back to making it a traditional web
with multiple HMTL files.the
The link http://www.socialhope.info/code/SocialHope_REBOOT.zip will
continue to have the source code for the single page app version of
website, for those who find this thread in a search or simply want tomailing
download the code later.
Kelly Cookson
IT Project Leader
Dot Foods, Inc.
1.217.773.4486 ext. 12676
kcookson@xxxxxxxxxxxx
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,mailing
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,mailing
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,intended
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/
________________________________
NOTICE: The information in this electronic mail transmission is
by CoralTree Systems Ltd for the use of the named individuals orentity to
which it is directed and may contain information that is privileged orcopying or
otherwise confidential. If you have received this electronic mail
transmission in error, please delete it from your system without
forwarding it, and notify the sender of the error by reply email or by--------------------------------------------------------------------------------
telephone, so that the sender's address records can be corrected.
mailing
CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,mailing
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
list--
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.