Webmastersite.net

Search    Register    Log In   

Details

Browser Issues and Debug Mode
By
May 13, 2015 at 10:09 PM (Edited May 13, 2015 at 10:11 PM)

The main time sink issue today was tracking down why the deleting and whitelisting javascript links in the WSN antivirus scanner misbehave in Firefox. As it turns out, the unrelated javascript that checks the window width to resize the menu frame for small screens is at fault. The jquery $(window).width() works nicely in chrome but breaks in firefox. To make firefox happy, I've changed it to document.innerWidth.

I decided to disable the ability to set debug mode with a URL paramter when not logged in as an admin. Tough call as it makes my job harder, especially in identifying causes of page slowness, but showing less info to potential attackers may help. Debug info for admins from the debug=1 parameter will only start after the admin info has been verified, so it's much better to use the System Configuration page to activate debug mode.

I was looking to limit the length of blog entries that show on the front page and to show a "read more" after cutting them off. For that purpose, I've added {LINKTEXTLENGTH}, {LINKMESSAGELENGTH} and {LINKDESCRIPTIONLENGTH} template variables to WSN. Here's what I'm using in the front page template:
{LINKTEXT[2000]}
<IF {LINKTEXTLENGTH} is greater than 2000><p><a href="{LINKDETAILSURL}">Read Full Blog Entry</a></p></IF>




Tags
Views 54 views. Averaging 0 views per day.
Similar Listings
Calendar, minification and development mode
MIME issues
Turn browser bookmarks into a web directory
File browser, page speed and fixes
Link framesets, indented level selectors, geolocation issues and more

Sorry, you don't have permission to post. Log in, or register if you haven't yet.

Please login or register.