Caching Of 'semi' Dynamic JavaScript (IIS, ASP, IE6)

Jul 23, 2005

We have a dynamically created javascript menu (from ASP), which is
customised per user (Have already taken all the static code out into
separate cached .js file)

The size of the 'dynamic' menu content can be as much as 10kB, and the
menu typically does not change for the duration of the user's session
- i.e. it would be nice to get the browser to 'cache' this. It is an
Intranet application, and is typically aimed at IE6 clients only.

Have considered the following strategies

1) Cookies - although the last thing I want is the whole menu coming
back to the server on every HTTP request - but would be useful IF
there is e.g. a header option the cookie to 'send' the cookie (Server
-> Browser) without the browser ever sending it back to the server
(but the browser still being able to 'read' the cookie?)

2) Creating 'dynamic' javascript files - i.e. send the output per user
to a mangled .js file (e.g. with a session ID in the filename), into a
cached js file. Would however need to cleanup the files quite
regularly, and giving IUSR file creation access doesn't seem a good
idea. Would then get the browser to include the JS by generating ASP
along the lines of.
<script language="JavaScript"
src="TempScripts/Menu<%=UserSession%>.js"></script>

Is there any other way?

Second Question : Is there any way to get IE to stop sending up the
HTTP REFERER header up to the server (e.g. RegKey) - this is pretty
pointless on an Intranet App (I know there is a way to do in
NetScape).

View 5 Replies


ADVERTISEMENT

Ajax :: How To Stop Browser From Caching Dynamic HTML

May 12, 2010

I'm not having this issue with Mozilla Firefox, but it seems that the results of the code below are being cached in EI 8. When the browser makes another asynchronous call to the server with different results from the database, those results are not being displaying on the wepage. How do I fix this problem. As I mentioned above the code works fine in Mozilla Firefox. The page displays data in EI 8 with no errors five seconds after the page has loaded, but as the information in the database changes, I'm not seeing those changes reflected on the page in 5 second intervals.

<html>
<head>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script>
$(document).ready(
function() {
setInterval ( "reload1()", 5000 );
});

function reload2(){
$.get(
'vcci.php',
function($xml) {
// Make the XML query-able with jQuery
$xml = $($xml);
var $iso2 = $xml.find('data').text();
//alert($iso2);
$('#para').text($iso2);
},
'xml'
);}

</script>
</head>
<body>
<p id="para"></p>
</body></html>

View 1 Replies View Related

IE Caching Javascript

Apr 23, 2006

I have a oc4j application server hosting my application . I can see
from tcp monitor for eg: GET /scripts/main.js and the server responds
with last-modified timestamp. However for subsequent request IE does
not use if-modified-since and further for each script in Local Settings
is getting cached as main[1].js, main[2].js etc and also in different
directories. This does not happen for all script but if a page has some
15 scripts included the last 5 scripts show this behaviour.

View 5 Replies View Related

Javascript Preloaders Not Caching

Nov 23, 2004

Can anyone help figure out why my javascript preloaders aren't preloading! Code:

the navigation section utilses simple js rollovers on the text options, with the onMouseRollover event loading an additional graphic image to the right of the menu. It appears almost instantaneously on broadband, but as I'm testing it on 56k and I'm trying to appease all users I required the navigation images to preload (especially those giving the description of the option).

They appear to preload fine in Netscape7 but not in IE6???

I won't list the entire source here apart from the following sections:: Code:

View 4 Replies View Related

Prevent JavaScript File Caching In All Browsers

May 14, 2007

I'm currently using this method to refer to my JavaScript files:

<script type="text/javascript" src="filename.js"></script>
While doing work for some clients I have made changes to the the JavaScript file referenced above. Because their browser has cached it, they end up getting errors on the page unless they hard refresh and get the new version of the file.

Is there anyway to make the JavaScript file come down fresh if it has been modified since the last download?

View 3 Replies View Related

Semi-Colon

Jul 20, 2005

I am never sure of when a semi-colon is required in javascript. Is
there a definite rule? Code:

View 2 Replies View Related

Make Semi-advanced Web Browser?

Feb 9, 2010

Can anyone tell how to make semi-advanced web browser?

View 1 Replies View Related

If One Or Either Of Variable Orbital Period Or Semi-Major Axis Is A Zero

Nov 16, 2009

I am having difficulties with my code and i've tried many ways to do everything from do while to if else statements. i've got everything in my code down but that pesky loop statement, and i'm trying to write my code where it says if one of either of variable Orbital Period or Semi-Major Axis is a zero, then it should use different way to read the inputed information.

View 3 Replies View Related

Make A Background Fade Out To A Semi-transparent State After / During Upload?

Dec 5, 2011

i have been tasked to create a web page that includes a fading background. (It must become semi transparent once the page has loaded,and remain until a new page is selected. I want to use a similar concept to: [URL]. However instead of fading out to black, i need it to fade out to white (between 10-15% image opacity). I would also need a similar central, transparent, scrollable frame/div (where each page will load up within and like the above link,i need a different background image to each page.

View 1 Replies View Related

JQuery :: Make A Background Fadeout To A Semi Transparent State After Upload?

Dec 5, 2011

For a college assignment, i have been tasked to create a web page that includes a fading background. (It must become semi transparent once the page has loaded,and remain until a new page is selected. I want to use a similar concept [URL]. However instead of fading out to black, i need it to fade out to white (between 10-15% image opacity).

I would also need a similar central, transparent, scrollable frame/div (where each page will load up within and like the above link,i need a different background image to each page.

View 1 Replies View Related

How To Insert A Dynamic Value Into A Javascript?

Jul 20, 2005

I'm merely trying to grab a value from a form and insert it into a javascript. Any hints as to what's wrong with the code below?

Request.form("AMOUNT") as used below does not bring my value into the
javascript (This is related to GoToast ROI Conversion tracking).

<script language="javascript">
<!--

if (typeof(ROIID) + '' != 'undefined')
{
TrackEvent('Sale', request.form("AMOUNT"));
}
//-->
</script>

View 1 Replies View Related

Dynamic JavaScript Source

Apr 29, 2004

Can I control the src attribute of a header <script> tag so that it loads a different script file depending on the value of a variable?

I have a javascript file that currently holds the variables for several countries and weihgts too much for a single file. I estimate that only 2-3kb of the 40+ that it now holds are used at any given point depending on the user's chosen country.

Now, I can split the file into several smaller files to reduce loading time but only if I have a way of dynamically loading the different files.

View 5 Replies View Related

XML And Caching

Jul 23, 2005

If I use javascript to 'read' and XML file does that mean that the XML
file gets downloaded to the user's cache?

I'm building a quiz and I'd rather not have the answers too easily
available. I believe there's no real way to secure anything client side
with javascript so I'm just trying to keep the curious at bay.

View 3 Replies View Related

Deleting The Last Row In A Dynamic Javascript Table

Feb 17, 2006

I have this dynamically created table in my one of my php forms
that shows the names of the people the user has entered into a text
field. When they hit add a row displays, showing the name they entered.
Also, an image that allows them to delete shows beside the name upon
creation.

The delete removes the name from the table and pushes the
other names to the top. Simple stuff, however, if I delete the last
name displayed(the bottom of the table), then the next, then the next,
IN ORDER, I have no problems. If I pick a name that is in the middle or
top of the table, everything below does not allow me to delete Code:

View 5 Replies View Related

Dynamic Insertion And Execution Of JavaScript

Apr 20, 2006

I'm developing a webpage that is composed by several divs. These divs
are supplied by the server depending on the user that made the request.
Some of these divs require some javascript functions to be called when
they are added to the page. I add the content using innerHTML (function
renderPage(data) ....

View 3 Replies View Related

Javascript, Dynamic IFrame And Firefox

Aug 27, 2007

I've got a page that creates an iframe and uses javascript to write to it.

Works like a charm in IE but not Firefox.

<script language="JavaScript"><!--
document.write ('<iframe width="100" height="100" name="myframe" src="blank.htm" FRAMEBORDER="1" scrolling="no"></iframe>');
document.frames[0].document.open();
document.frames[0].document.writeln('<html><head></head><body>');
document.frames[0].document.writeln('YO!</body></html>');
document.frames[0].document.close();
//--></script>

What I get in IE is the "YO!" written to the iframe. What I get in Firefox is the 404 not found page of the site where the original "jstest.html" page and script are hosted.

View 2 Replies View Related

Dynamic Form Elements Using JavaScript

Sep 17, 2004

I need to dynamically add elements to a form using javascript. The objective is that on clicking a certain button , a set of form fields are appended to the exiting ones. Code:

View 2 Replies View Related

Disabling A Dynamic Drop-down With JavaScript

Mar 6, 2006

In a JSP page I am trying to disable a Trade Class drop-down list if the user does not select the ADULT option of the Division drop-down list.

Therefore, Trade Class drop-down list availability depends on the option selected in the Division drop-down list. For instance, if the user selects the KIDS division option then the Trade Class drop-down list should be disable.

I am trying to use JavaScript to do this but I can't get it to work. I have the OnClick attribute in the Division drop-down list so that when a user selects any option from the list the index gets past to the JavaScript function. In my drop-down Division ADULT has index 1.

function enableDisableTradeClass( ) {
var index = document.frm_container_shipments.drp_division_fltr.selectedIndex;
//alert('Selected Division= ' + index);
if ( index != 1 ) {
document.frm_steps.drp_trade_class_fltr.value = "";
document.frm_steps.drp_trade_class_fltr.selectedIndex = 0;
}}

View 1 Replies View Related

How Do I Get Dynamic Arrays As Values For The Javascript?

Jan 9, 2007

I know very little javascript and need to use it to pt a banner across a page, where it is pulling from values a customer puts in the backend.Here is the javascript: Code:

View 4 Replies View Related

NO Caching Of A SWF File

Jan 27, 2009

I had an incident in which I uploaded a swf file with an incorrect URL. Well, when I noticed the issue I uploaded a 'new' file - but those who have previously seen the site kept seeing this "older .swf".Without a huge proces. renaming files, modifying html files etc.. Is there a way to customize a meta tag or some other mechanism to have a '.swf' file NOT CACHE. It has to not cache in all browsers.. ala: ie, ff, safari

View 2 Replies View Related

How To Dynamic Control Some Picture's Size By Javascript

Feb 14, 2006

i have some pictures in a page. there are have difference sizes. some
of them are too widen for be arrange in a line. so
i been tried to adject their sizes to more suitable.

i add a event to that image likes:
<img id="img" onLoad="adjustSize(this)" src="123.jpg">

and write a function in javascript:
function adjustSize(obj){
if (obj.width>250){
sizeRate=250/obj.width;
obj.width=obj.width*sizeRate;
if (obj.hight>268)
obj.hight=268;
}}

but exactly,i can get the image's width and height. cuz the loading
hasn't finished while the function of adjustSize works.

View 5 Replies View Related

Dynamic Content Areas - JavaScript & Ajax???

Sep 29, 2005

I would like to build an HTML page that has four content areas. The first with 3 links that when clicked chage what is shown in the other 3 - and so changing the default content in these sections. The content for these sections will be contained in seperate HTML files sitting on the same server.

I understand this can be done without refreshing the page and believe JavaScript and Ajax is the best method to do this. Any advice?

View 2 Replies View Related

Javascript Question On Dynamic Select Boxes

Jan 28, 2002

Question: How hard is the following to do in javascript and does anyone have a good example of this in use (aka how do you do it? )

4 drop down boxes all on one page. I have 4 items in the list of the first drop down box.

Red
Blue
Green
Orange

When I select one, I want the choice to be taken out of the list for the second drop down box. So if I select Blue in Drop Down #1, Drop Down #2 now has the option of

Red
Green
Orange

If I select Red from the list the Drop Down #3 now has

Green
Orange


Then if i select Orange, the last drop down has only one value and that is Green.

View 5 Replies View Related

Passing Dynamic Form Values To Javascript

May 26, 2007

I have a form that has been dynamically created from PHP. It is basically a calculator and the number of form elements as well as names of the elements can vary greatly.

I basically want to add a button that will open a new browser window with the form info being passed to it. Basically it will create a quotation for the customer that is suitable for printing.

The only way I know to do the popup window is with javascript (unless php can do it). I know how to access form elements with javascript if the form element exists, but given most of the elements may change, I do not know how to access them.

View 1 Replies View Related

Dynamic Content Replacement Using Ajax/Javascript/PHP

Jun 26, 2007

I'm sure some wizard will tell me this is a classic example of "piece of cake"; in which case I bow and promise to listen In case I've struck granite rock, feel free to throw questions my way and I'll tell you if I've tried it or not.

I have a file, main.php (I know this is the JS-forum, bear with me). It outputs HTML and inline Javascript functions. When the user clicks on a graphical "tab", that tab is activated, and an ajax call is made to fetch.php with some specific parameters. Once the ajax request has completed, a given innerHTML container on the now active tab is filled with the stuff that fetch.php outputs.

So far so good.

The problem is that the stuff that fetch.php outputs is partial pure HTML and partial inline javascript. And this is where it gets tricky. If I declare an inline javascript function in the returned data, Firefox (and I suspect MSIE) refuses to understand that the function is there. It simply doesn't exist (!).

Using the Web Developer add-on for Firefox, there's an option to look at "Source code" and "Generated source code". The output from these two differ in that when I view the "Generated source code", I see the dynamically inserted javascript/HTML from fetch.php, whereas viewing "just" the source doesn't.

What did I do wrong? How do I get the browser to find/accept/activate the javascript code/functions that were inserted dynamically? I cannot put them in a .js file and include it, since they need to be dynamically created, and I cannot use eval() since that executes javascript "as is", in which a function will not be executed unless called.

View 5 Replies View Related

Location.href Caching And ASP

Jul 23, 2005

I'm passing the asp parameters using the url current page is files.asp and I'm using window.location.href=files.asp?action=deletefile to pass the action to the serverside

My code never got executed (like the page was cached) unless i put document.write("") before the window.location directive.

Here's the code:

function confirmDelete(x){
var potvrda=confirm("Kliknite OK za brisanje. Cancel za povratak.");
if (potvrda==true) {
trans="files.asp?action="+x;
document.write("")
window.location.href=trans;
}
else {}
}

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved