LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-24-2007, 03:56 PM   #1
sharathkv
Member
 
Registered: Jul 2003
Distribution: HP-UX
Posts: 35

Rep: Reputation: 15
Disable caching in HTML


Hi,

Is there a way to disable caching programatically in HTML?

I use a lot of HTML pages, and when I type a URL in Internet Explorer, it shows me a lot other HTML pages that have been cached. I don't want these pages to be cached for security reasons.

I need to programatically disable caching of HTML pages on the client machine where these pages will be accessed.

Thanks
 
Old 04-24-2007, 04:17 PM   #2
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Blog Entries: 3

Rep: Reputation: 35
Wait you mean to say you're concerned about security or privacy? And you're using Internet Explorer? Whew, good luck on that.
I don't remember the link, but I'm remember reading article on clearing Internet Explorer history and it looked like a real pain. Attempting to clear it manually could probably take a good 5 minutes out your life.

And to make things worse...
This is just the stuff the author knew about.
In actuality who knows how deep within the system the history is buried. Internet Explorer is integrated tightly with Windows.

I wish you the best, really I do. But it looks like a lost cause for Internet Destroyer.

I recommend Firefox or actually any browser thats NOT Internet Explorer. Or better yet, take DSL on small usb stick with you whenever you plan on going on public computers.
 
Old 04-24-2007, 04:47 PM   #3
sharathkv
Member
 
Registered: Jul 2003
Distribution: HP-UX
Posts: 35

Original Poster
Rep: Reputation: 15
I tried this & it's not working
Code:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
I'm not in a position to decide who will use which browser & why. Right now all I need to know is how to disable caching in IE? and make it work.

Thanks
 
Old 04-24-2007, 09:09 PM   #4
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
Quote:
Originally Posted by sharathkv
I use a lot of HTML pages, and when I type a URL in Internet Explorer, it shows me a lot other HTML pages that have been cached. I don't want these pages to be cached for security reasons.
That's not caching, that's the browser history. It also has less than nothing to do with HTML. You need to find the appropriate setting for your browser (and no, I don't know what that is). It's impossible to change that through HTML.
 
Old 04-24-2007, 09:16 PM   #5
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Blog Entries: 3

Rep: Reputation: 35
Lightbulb

Quote:
Originally Posted by sharathkv
I tried this & it's not working
Code:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
I'm not in a position to decide who will use which browser & why. Right now all I need to know is how to disable caching in IE? and make it work.

Thanks
Then I misinterpreted your goal then. But now its looks like I'm going to be even more confused. You want to somehow disable local browser-caching from the server side somehow?
If user information being leaked somehow from cached html pages is the concern.. you could use server-side scripting to generate html interfaces. That way the page cached is nearly useless locally. All that would be left is some cached images and a completely broken interface.

However some further research shows a microsoft recommend way.

http://support.microsoft.com/kb/q222064/


And another way thats more along the lines of my thinking.

http://www.pacificnet.net/~johnr/meta.html

Sadly though, not all the rules are not necessarily followed and browsers, particularly Internet Explorer, are known to do their own thing. So it looks like CGI is the only way to make it bullet.
It could be very tedious. But basically your (cached) html page would end up looking like this.

<html>
<form METHOD="GET">
bunch of cryptic of calls that result html being displayed
calls that are only valid for a specific amount of time from a specific ip

</form>

And on your server side...

Check ip of client.
accept strange cryptic cgi calls that produce html interfaces for x period of time
from that specific host

But NATs could potentially break this. So you're left with cookies. And since cookies can be manipulated you're back to square one. And even if they didn't, a caching proxy could still ruin you, especially if the proxy was somehow able to freeze cookies in time.

Unfortunately it basically looks like theres no hope at all.


Unless you use https perhaps. Would save some trouble. You'll notice typing https://anypage
reveals that atleast https pages are'nt cached.

Last edited by slantoflight; 04-24-2007 at 09:20 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Search & Replace Technique to Fix html HREFs w/o html extension donv2 Linux - Newbie 1 01-30-2007 11:59 PM
How to disable read and write caching in filesystems Kumar Programming 1 11-11-2005 03:36 AM
Disable Route Caching RSalameh Linux - Networking 1 02-01-2005 08:30 PM
Konqueror + file:/usr/share/doc/HTML/index.html jon_k Linux - Software 2 11-25-2003 05:06 AM
html caching JustinHoMi Programming 1 11-13-2001 07:05 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration