Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: localhost cache vs ip cache

14 Aug 2015   #1
RBS7

windows 7 & 8
 
 
localhost cache vs ip cache

Okay this is the setup

I am running a mysql database and localhost web site installed via XAMPP

now all is good except for one item.
In order to connect to the website via my lan (from another PC) I use a local ip
(example: 192.168.1.3/test/admin.php)
in normal use on the same computer i acces it via
(example: localhost/test/admin.php)

Now here is the rub, if I alter my css while using the localhost, it does not update on the ip address
even if I do a ipconfig/ flushdns, it flushs localhost but that still does not flush the ip address content
the content will display differently dependent on using localhost or ip address.

So my question is how do I flush the ip address content?

Hope that all makes sense.

[Update - solved it]
I needed to turn off cacheing using
<meta http-equiv="cache-control" content="no-cache" />


My System SpecsSystem Spec
.
14 Aug 2015   #2
UsernameIssues

W7 Pro SP1 64bit
 
 

I understand that the issue is solved...
...but I wanted to make a comment/question:

You can disable the service named DNS Client. This means that you don't need to flush the DNS cache - since there will be no cache to flush. (Well, there will be no DNS cache at the OS level. Browsers still DNS cache info until they exit RAM.) If I'm understanding your post correctly, flushing DNS cache was just something that you tried and it turned out to have nothing to do with your problem. The info about disabling the caching service is just FYI at this point.

Why use localhost/test/admin.php?
When on the same computer, does it not work to use that computer's static IP address?
(e.g. 192.168.1.3/test/admin.php)


Thanks for reading.
My System SpecsSystem Spec
15 Aug 2015   #3
RBS7

windows 7 & 8
 
 

Quote   Quote: Originally Posted by UsernameIssues View Post
I understand that the issue is solved...
...but I wanted to make a comment/question:

You can disable the service named DNS Client. This means that you don't need to flush the DNS cache - since there will be no cache to flush. (Well, there will be no DNS cache at the OS level. Browsers still DNS cache info until they exit RAM.) If I'm understanding your post correctly, flushing DNS cache was just something that you tried and it turned out to have nothing to do with your problem. The info about disabling the caching service is just FYI at this point.

Why use localhost/test/admin.php?
When on the same computer, does it not work to use that computer's static IP address?
(e.g. 192.168.1.3/test/admin.php)


Thanks for reading.
yes the static ip works on the local machine, it is easier for me to remember localhost than the ip. With 8 machines on our LAN I am forever having to check to see which ip is for which.

And yes I could turn off DNS, but I do a lot of experimenting and programming on all of the machines, for various things. So, I like to keep the machines on in their native state. It is to much to remember which, I have on and off, on which machine, etc., so the easy solution is to just leave them as is. Thank you for the suggestions.
My System SpecsSystem Spec
.

15 Aug 2015   #4
Alejandro85

Windows 7 Ultimate x64
 
 

It has nothing to do with DNS settings or any ip/localhost configuration. As you discovered yourself, it's only a matter of the browser caching the old css and using it instead of requesting a new copy from the server. Look at the network traffic in the browser development tools to verify this.

Have a look here for further details:
html - Browser Caching of CSS files - Stack Overflow
My System SpecsSystem Spec
15 Aug 2015   #5
UsernameIssues

W7 Pro SP1 64bit
 
 

Ah yes. Remembering IP addresses. Makes sense now.

Disabling DNS would only be for brief testing. I leave the service property window open to remind me to put it back the way that it should be. I also have several virtual machines that I use for testing. They revert back to a known good state when I close them. You could run 8 virtual machines at the same time from one host computer - as long as the tasks were not too CPU intensive.
My System SpecsSystem Spec
16 Aug 2015   #6
RBS7

windows 7 & 8
 
 

Quote   Quote: Originally Posted by UsernameIssues View Post
Ah yes. Remembering IP addresses. Makes sense now.

Disabling DNS would only be for brief testing. I leave the service property window open to remind me to put it back the way that it should be. I also have several virtual machines that I use for testing. They revert back to a known good state when I close them. You could run 8 virtual machines at the same time from one host computer - as long as the tasks were not too CPU intensive.
umm, VMs that is a good idea, thanks
My System SpecsSystem Spec
Reply

 localhost cache vs ip cache




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
DNS Cache
Hi everyone. I'm having some problems viewing 3 of my sites on Win7 and XP. I can view the 3 sites on a machine with 2000 Pro. My host says they can see the sites and I can upgrade the sites but they won's show up for me. I've cleaned the dns cache to no avail. Any ideas as to why this is...
Network & Sharing
DNS Cache
Will I be giving myself any problems if I tick the DNS Cache in CCleaner which is scheduled to run once everyday using it's default settings. The PC is my Laptop
Network & Sharing
cache and RAM?
can anyone explain what cache is? i know RAM is memory which will be wiped when OS or PC is turned off.
General Discussion
What is a L1/L2 cache???
Hello friends, i want to know what exactly does L1/L2 cache means in processor,graphics card?? Though i have searched in detail but still not satisfied with the information....so need help from my community/forum members & friends....:) This might be most dumb question as far as the forum...
Hardware & Devices
CPU L2 cache not known to win 7
Again, this is another tweak I found in Yamicsoft Windows 7 manager. I have yet to make changes, am just exploring the software. On the top in this picture, it states that you can manually set file caching memory settings, and below that that it is necessary to manually set the processor L2...
Performance & Maintenance


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:19.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App