Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by hassanayoub85
at 2024-07-25 23:40:07
Point:500 Replies:12 POST_ID:829116USER_ID:12011
Topic:
Microsoft IIS Web Server;Windows Server 2008;Web Servers
Dear,
I have windows server 2008 which hosts my website.
in my website, I have 2 html pages: index.html and 1.html where in index.html there is a hyperlink to 1.html and vice versa.
If I go to index.html, and it shows in my chrome browser, then i edit it using filezilla ftp software, and repast the link in the browser new tab, i found that the old page is showing and not the new edited page. and the new page will not appear else if I press "F5" in the browser tab, and if i edit the 1.html too, i see that the 1.hml also keeps showing old data, till pressing F5.
How can I force the server to always show my last edited html files, and not by only when pressing F5!?
Thanks for your help
Note: same thing with aspx and php file, not reflecting edited files else after pressing F5
I have windows server 2008 which hosts my website.
in my website, I have 2 html pages: index.html and 1.html where in index.html there is a hyperlink to 1.html and vice versa.
If I go to index.html, and it shows in my chrome browser, then i edit it using filezilla ftp software, and repast the link in the browser new tab, i found that the old page is showing and not the new edited page. and the new page will not appear else if I press "F5" in the browser tab, and if i edit the 1.html too, i see that the 1.hml also keeps showing old data, till pressing F5.
How can I force the server to always show my last edited html files, and not by only when pressing F5!?
Thanks for your help
Note: same thing with aspx and php file, not reflecting edited files else after pressing F5
Author: hassanayoub85 replied at 2024-07-27 08:44:54
Wow thanks solved by he timestamp issue
Accepted Solution
Expert: Dave Baldwin replied at 2024-07-26 11:25:05
500 points EXCELLENT
Not without creating other problems. The exact method depends on the web server you are using. You would have to go into your web server setup and change the expiration time (that is sent with every file access) to 0. That means not just the HTML/PHP files but also all image files, CSS files, and javascript files.
However... doing that will mean that the users of your site will see it load Every Time like you did a complete Ctl-F5 refresh every time. If you leave it alone, then many files will be cached so they load from the local browser cache quickly instead of downloading from the server each time.
However... doing that will mean that the users of your site will see it load Every Time like you did a complete Ctl-F5 refresh every time. If you leave it alone, then many files will be cached so they load from the local browser cache quickly instead of downloading from the server each time.
Author: hassanayoub85 replied at 2024-07-26 11:15:55
So, my problem is not solvable?
Expert: Dave Baldwin replied at 2024-07-26 11:12:20
"duncanb7" is only half right. Browsers will cache the HTML that PHP files generate which is the part that you see.
Author: hassanayoub85 replied at 2024-07-26 10:56:34
but "duncanb7" said the browsers dont cache php files!?
Expert: Dave Baldwin replied at 2024-07-26 10:52:34
How can make server dont allow caching at all?
You can't... because it isn't. Your browsers are doing the caching. Author: hassanayoub85 replied at 2024-07-26 10:47:38
ok tested many times and eveything is right o the pc (chrome browser).
However weird things appearing on my mobile!!!
i changed the 1.php and 2.php files on server, on pc gets refreshed always and get the new and latest version, but on my mobile it wont get the last file till i either:
1- go to the application and clear on clear cache, then reopen the application.
2- or, click on the address bar and click go, like pressing F5, so it seems that mobiles are caching the contents?
Any ideawhile mobile is caching he php filesand how to avoid this?
I am using acroid kitakt and chrome browser
However weird things appearing on my mobile!!!
i changed the 1.php and 2.php files on server, on pc gets refreshed always and get the new and latest version, but on my mobile it wont get the last file till i either:
1- go to the application and clear on clear cache, then reopen the application.
2- or, click on the address bar and click go, like pressing F5, so it seems that mobiles are caching the contents?
Any ideawhile mobile is caching he php filesand how to avoid this?
I am using acroid kitakt and chrome browser
Author: hassanayoub85 replied at 2024-07-26 10:22:34
Wow, Ive jsut test it and seems everything is right, i will do more testing and get back to you
Expert: duncanb7 replied at 2024-07-26 10:14:30
it won't , server language page won't be cached,
Please click "request attention" button, other experts will assist on this subject.
Duncan
Please click "request attention" button, other experts will assist on this subject.
Duncan
Author: hassanayoub85 replied at 2024-07-26 10:11:31
Dave Baldwin:
How can make server dont allow caching at all?
duncanb7:
I tried both, php and asp.net, but same result as htlml
How can make server dont allow caching at all?
duncanb7:
I tried both, php and asp.net, but same result as htlml
Expert: duncanb7 replied at 2024-07-26 00:13:50
if your computer allow to run php , You can save your html page to php file which won't be cached, for example,
copy 1.html to 1.php and add <?php ?> on the top in the file similar to following file.
For convert to asp file, it might work but need to check
Duncan
1.php
========
copy 1.html to 1.php and add <?php ?> on the top in the file similar to following file.
For convert to asp file, it might work but need to check
Duncan
1.php
========
Expert: Dave Baldwin replied at 2024-07-26 00:07:08
You have discovered browser caching where your browser uses the last version of a page that it has loaded unless you force it to get a new version from the server. The only way to stop that is to set the cache 'expiration' time to 0 on the server.
While it is tempting to do that as a developer, caching actually speeds up browsing for the 'normal' user by not having to download files that have not changed. Google's PageSpeed recommendations are that you make the cache expiration much Longer rather than shorter. Cached files are displayed more quickly than files that have to be retrieved from the server.
I would recommend that you get used to pressing F5 while you're still developing the page. Shortening the expiration to 0 only benefits you. Overall, it slows your site down for your users.
One other thing to note is that CSS and javascript files are also cached and if your 'new' page uses the same file names as the previous versions of CSS and javascript files, they may not load as you expect either. A few times I have had to load CSS and/or javascript files in the address bar to pick up the new version and then go back to the page and press F5 to get everything to load properly.
While it is tempting to do that as a developer, caching actually speeds up browsing for the 'normal' user by not having to download files that have not changed. Google's PageSpeed recommendations are that you make the cache expiration much Longer rather than shorter. Cached files are displayed more quickly than files that have to be retrieved from the server.
I would recommend that you get used to pressing F5 while you're still developing the page. Shortening the expiration to 0 only benefits you. Overall, it slows your site down for your users.
One other thing to note is that CSS and javascript files are also cached and if your 'new' page uses the same file names as the previous versions of CSS and javascript files, they may not load as you expect either. A few times I have had to load CSS and/or javascript files in the address bar to pick up the new version and then go back to the page and press F5 to get everything to load properly.