Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cs-uob/COMSM0085
Browse files Browse the repository at this point in the history
  • Loading branch information
m-j-edwards committed Jan 30, 2024
2 parents 4278cb3 + 79937ab commit 9637295
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/exercises/part1/posix1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ <h2 id="videos"><a class="header" href="#videos">Videos</a></h2>
<tr><td><a href="https://web.microsoftstream.com/video/9091bdf6-2242-4b43-b09e-9641f9401135">Package managers</a></td><td style="text-align: right">6 minutes</td><td><a href="https://uob-my.sharepoint.com/:b:/g/personal/me17847_bristol_ac_uk/EUPLvl82HzRGi-nyhSdiBicBb7EBnouRVnT6RAKKyzhqKQ?e=Ow5cmt">slides</a></td></tr>
</tbody></table>
</div>
<p><em>NB: The videos were recorded last year. Almost everything still applies, but you might see us talking about 'Alpine' or 'apk' -- the Linux VM we used to use, and its package manager. Look at the updated slides to see how Alpine-specific commands translate to Debian.</em></p>
<h2 id="exercises"><a class="header" href="#exercises">Exercises</a></h2>
<ul>
<li><a href="./ssh.html">Secure shell</a></li>
Expand Down
1 change: 1 addition & 0 deletions docs/exercises/part1/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ <h2 id="videos"><a class="header" href="#videos">Videos</a></h2>
<tr><td><a href="https://web.microsoftstream.com/video/9091bdf6-2242-4b43-b09e-9641f9401135">Package managers</a></td><td style="text-align: right">6 minutes</td><td><a href="https://uob-my.sharepoint.com/:b:/g/personal/me17847_bristol_ac_uk/EUPLvl82HzRGi-nyhSdiBicBb7EBnouRVnT6RAKKyzhqKQ?e=Ow5cmt">slides</a></td></tr>
</tbody></table>
</div>
<p><em>NB: The videos were recorded last year. Almost everything still applies, but you might see us talking about 'Alpine' or 'apk' -- the Linux VM we used to use, and its package manager. Look at the updated slides to see how Alpine-specific commands translate to Debian.</em></p>
<h2 id="exercises"><a class="header" href="#exercises">Exercises</a></h2>
<ul>
<li><a href="posix1/./ssh.html">Secure shell</a></li>
Expand Down
2 changes: 1 addition & 1 deletion docs/exercises/part1/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/exercises/part1/searchindex.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/exercises/part2/http/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ <h2 id="a-web-server-in-c"><a class="header" href="#a-web-server-in-c">A web ser
<p>You can try this out for yourself if you want: make a HTML file called <code>one.html5</code> in the web directory and access it with the browser. (<code>.html5</code> is not an official extension, it's something I just made up. The correct one to use for proper websites is <code>.html</code>.) The server won't send a <code>Content-type</code> header at all, since it doesn't know this extension, so the browser will either display it as a plain text file or download the file instead of showing it.</p>
<p>Edit the map in the source file and change the entry for <code>text/html</code> to read <code>&quot; html htm html5&quot;</code>, keeping the space at the start of the string. Recompile the server.</p>
<p>Rename the file to <code>two.html5</code> (I'll explain why in a second) and restart the server and try and open the file in the browser. This time, the file will display as a HTML page.</p>
<p>Why did you have to rename the file? Because the browser will otherwise try and be clever if it thinks you're trying to access a file that you've just downloaded already. The server sends a <code>Last-modified</code> header, and if the browser notices you're asking for a file you have just downloaded, with the same timestamp as the HTTP header indicates, then your browser might ignore the rest of the request and not see that another header has changed. Changing the file name forces the browser to look again as it thinks it's a different file now. Deleting the downloaded file, or editing the file on the server, would both have the same effect.</p>
<p>Why did you have to rename the file? Because the browser will otherwise try and be clever if it thinks you're trying to access a file that you've just downloaded already. The server sends a <code>Last-modified</code> header, and if the browser notices you're asking for a file you have just downloaded, with the same timestamp as the HTTP header indicates, then your browser might ignore the rest of the request and not see that another header has changed. Changing the file name forces the browser to look again, as it thinks it's a different file now. Deleting the downloaded file, or editing the file on the server, would both have the same effect.</p>
<p>There is a moral here: if you're doing web development, and you are trying to find out why a change you made isn't showing in the browser (even if you refresh the page), it might be a cache problem. On the network tab of the developer tools window, there should be a checkbox to &quot;disable cache&quot; which you might want to turn on in this case and reload the page again, to exclude the cache as the possible source of the problem.</p>

</main>
Expand Down
2 changes: 1 addition & 1 deletion docs/exercises/part2/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ <h2 id="a-web-server-in-c"><a class="header" href="#a-web-server-in-c">A web ser
<p>You can try this out for yourself if you want: make a HTML file called <code>one.html5</code> in the web directory and access it with the browser. (<code>.html5</code> is not an official extension, it's something I just made up. The correct one to use for proper websites is <code>.html</code>.) The server won't send a <code>Content-type</code> header at all, since it doesn't know this extension, so the browser will either display it as a plain text file or download the file instead of showing it.</p>
<p>Edit the map in the source file and change the entry for <code>text/html</code> to read <code>&quot; html htm html5&quot;</code>, keeping the space at the start of the string. Recompile the server.</p>
<p>Rename the file to <code>two.html5</code> (I'll explain why in a second) and restart the server and try and open the file in the browser. This time, the file will display as a HTML page.</p>
<p>Why did you have to rename the file? Because the browser will otherwise try and be clever if it thinks you're trying to access a file that you've just downloaded already. The server sends a <code>Last-modified</code> header, and if the browser notices you're asking for a file you have just downloaded, with the same timestamp as the HTTP header indicates, then your browser might ignore the rest of the request and not see that another header has changed. Changing the file name forces the browser to look again as it thinks it's a different file now. Deleting the downloaded file, or editing the file on the server, would both have the same effect.</p>
<p>Why did you have to rename the file? Because the browser will otherwise try and be clever if it thinks you're trying to access a file that you've just downloaded already. The server sends a <code>Last-modified</code> header, and if the browser notices you're asking for a file you have just downloaded, with the same timestamp as the HTTP header indicates, then your browser might ignore the rest of the request and not see that another header has changed. Changing the file name forces the browser to look again, as it thinks it's a different file now. Deleting the downloaded file, or editing the file on the server, would both have the same effect.</p>
<p>There is a moral here: if you're doing web development, and you are trying to find out why a change you made isn't showing in the browser (even if you refresh the page), it might be a cache problem. On the network tab of the developer tools window, there should be a checkbox to &quot;disable cache&quot; which you might want to turn on in this case and reload the page again, to exclude the cache as the possible source of the problem.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="httpurl-research-exercises"><a class="header" href="#httpurl-research-exercises">HTTP/URL research exercises</a></h1>
<p>Research online what the following are and what they do:</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/exercises/part2/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/exercises/part2/searchindex.json

Large diffs are not rendered by default.

0 comments on commit 9637295

Please sign in to comment.